Skip to content

Commit

Permalink
Merge pull request #34 from szepeviktor/patch-2
Browse files Browse the repository at this point in the history
Check code style of all PHP files
  • Loading branch information
veewee authored Sep 2, 2022
2 parents e52f4f5 + fa25d17 commit 72042d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
__DIR__ . '/build',
__DIR__ . '/tools',
])
->name('*.php')
)
Expand Down
10 changes: 5 additions & 5 deletions build/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@

/** @var callable(list<SplFileInfo>):string $build */
$build = pipe(
fn (iterable $files): iterable => map(
static fn (iterable $files): iterable => map(
$files,
fn (SplFileInfo $file): string => 'require_once __DIR__.\'/'.$file->getRelativePathname().'\';'
static fn (SplFileInfo $file): string => 'require_once __DIR__.\'/'.$file->getRelativePathname().'\';'
),
fn (iterable $codeLines): iterable => concat(['<?php declare(strict_types=1);', ''], $codeLines),
fn (iterable $codeLines): iterable => concat($codeLines, ['']),
fn (iterable $codeLines): string => join($codeLines, PHP_EOL)
static fn (iterable $codeLines): iterable => concat(['<?php declare(strict_types=1);', ''], $codeLines),
static fn (iterable $codeLines): iterable => concat($codeLines, ['']),
static fn (iterable $codeLines): string => join($codeLines, PHP_EOL)
);

file_put_contents($src.'/bootstrap.php', $build($files));
Expand Down

0 comments on commit 72042d3

Please sign in to comment.