Skip to content

Commit

Permalink
chore: fix cs
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Mar 15, 2024
1 parent 4f9f47f commit b867e79
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions .castor/qa.php
Expand Up @@ -32,20 +32,19 @@ function all(): void
function install(?string $only = null): void
{
$map = [
'php-cs-fixer' => fn() => run('composer install --working-dir tools/php-cs-fixer'),
'phpstan' => fn() => run('composer install --working-dir tools/phpstan'),
'phpunit' => fn() => run('composer install --working-dir tools/phpunit'),
'rector' => fn() => run('composer install --working-dir tools/rector'),
'php-cs-fixer' => fn () => run('composer install --working-dir tools/php-cs-fixer'),
'phpstan' => fn () => run('composer install --working-dir tools/phpstan'),
'phpunit' => fn () => run('composer install --working-dir tools/phpunit'),
'rector' => fn () => run('composer install --working-dir tools/rector'),
];

if ($only) {
$map = array_filter($map, fn($key) => $key === $only, ARRAY_FILTER_USE_KEY);
$map = array_filter($map, fn ($key) => $key === $only, \ARRAY_FILTER_USE_KEY);
}

foreach ($map as $task) {
$task();
}

}

#[AsTask(description: 'Fix coding standards', aliases: ['cs'])]
Expand Down
4 changes: 2 additions & 2 deletions src/MarkdownFixer.php
Expand Up @@ -33,8 +33,8 @@ class MarkdownFixer
private readonly MarkdownRenderer $markdownRenderer;

public function __construct(
Environment $environment = null,
LoggerInterface $logger = null,
?Environment $environment = null,
?LoggerInterface $logger = null,
) {
if (null === $environment) {
$environment = new Environment();
Expand Down

0 comments on commit b867e79

Please sign in to comment.