Skip to content

Commit

Permalink
Update easy-coding-standard php, use new config syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
fodor0205 committed Aug 16, 2024
1 parent e49f8f9 commit 1e385a5
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 43 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ lint:

.PHONY: lint-php
lint-php:
vendor/bin/ecs check --config development/php-coding-standard.php
composer lint


.PHONY: test-e2e
Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"require-dev": {
"symplify/easy-coding-standard": "^10.1"
"symplify/easy-coding-standard": "^12"
},
"scripts": {
"lint": "ecs check --config development/php-coding-standard.php"
}
}
42 changes: 24 additions & 18 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 10 additions & 21 deletions development/php-coding-standard.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
<?php

use PhpCsFixer\Fixer\Basic\BracesFixer;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\EasyCodingStandard\ValueObject\Option;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
use Symplify\EasyCodingStandard\Config\ECSConfig;

return static function (ContainerConfigurator $containerConfigurator): void {
$parameters = $containerConfigurator->parameters();

$parameters->set(Option::PARALLEL, true);

// Files to include or exclude
$parameters->set(Option::PATHS, [
return ECSConfig::configure()
->withPaths([
__DIR__ . '/..',
]);
$parameters->set(Option::SKIP, [
])
->withSkip([
__DIR__ . '/../distribution',
__DIR__ . '/../node_modules',
__DIR__ . '/../testing',
]);

// Rule sets
$containerConfigurator->import(SetList::PSR_12);

// Tabs
$parameters->set(Option::INDENTATION, 'tab');
};
])
->withPreparedSets(
psr12: true
)
->withSpacing('tab');
4 changes: 2 additions & 2 deletions validatestreetnames.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
die();
}
?>
<form action="validatestreetnames.php?mode=<?php echo($mode) ?>&page=<?php echo($page); ?>" method="post">
<form action="validatestreetnames.php?mode=<?php echo ($mode) ?>&page=<?php echo($page); ?>" method="post">
<table border='1'>
<thead>
<th>Jó</th>
Expand Down Expand Up @@ -230,7 +230,7 @@
}
echo '</tr>';
}
?>
?>
</tbody>
</table>
<br />
Expand Down

0 comments on commit 1e385a5

Please sign in to comment.