-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
111 changed files
with
160 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
@@ -11,44 +11,60 @@ | |
|
||
use Jgut\ECS\Config\ConfigSet80; | ||
use PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\NoSilencedErrorsSniff; | ||
use PhpCsFixer\Fixer\FunctionNotation\MethodArgumentSpaceFixer; | ||
use PhpCsFixer\Fixer\Phpdoc\PhpdocAlignFixer; | ||
use PhpCsFixerCustomFixers\Fixer\NoNullableBooleanTypeFixer; | ||
use Symplify\EasyCodingStandard\Config\ECSConfig; | ||
|
||
return static function (ECSConfig $ecsConfig): void { | ||
$header = <<<'HEADER' | ||
$skips = [ | ||
NoSilencedErrorsSniff::class . '.Forbidden' => [ | ||
__DIR__ . '/src/Configuration.php', | ||
__DIR__ . '/src/Route/RouteResolver.php', | ||
__DIR__ . '/src/Mapping/Annotation/Router.php', | ||
], | ||
NoNullableBooleanTypeFixer::class => __DIR__ . '/src/Mapping/Attribute/Route.php', | ||
]; | ||
if (\PHP_VERSION_ID < 80_100) { | ||
$skips = array_merge( | ||
$skips, | ||
[ | ||
PhpdocAlignFixer::class => [ | ||
__DIR__ . '/src/Route/Route.php', | ||
__DIR__ . '/src/RouteCollector.php', | ||
], | ||
MethodArgumentSpaceFixer::class => [ | ||
__DIR__ . '/src/Mapping/Attribute/Group.php', | ||
__DIR__ . '/src/Mapping/Attribute/Route.php', | ||
], | ||
], | ||
); | ||
} | ||
|
||
$configSet = (new ConfigSet80()) | ||
->setHeader(<<<'HEADER' | ||
(c) 2017-{{year}} Julián Gutiérrez <[email protected]> | ||
@license BSD-3-Clause | ||
@link https://github.com/juliangut/slim-routing | ||
HEADER; | ||
|
||
$ecsConfig->paths([ | ||
__FILE__, | ||
__DIR__ . '/src', | ||
__DIR__ . '/tests', | ||
]); | ||
$ecsConfig->cacheDirectory('.ecs.cache'); | ||
|
||
$skips = [ | ||
NoSilencedErrorsSniff::class . '.Forbidden' => [ | ||
__DIR__ . '/src/Configuration.php', | ||
__DIR__ . '/src/Route/RouteResolver.php', | ||
__DIR__ . '/src/Mapping/Annotation/Router.php', | ||
], | ||
NoNullableBooleanTypeFixer::class => __DIR__ . '/src/Mapping/Attribute/Route.php', | ||
]; | ||
|
||
if (\PHP_VERSION_ID < 80_100) { | ||
$skips[PhpdocAlignFixer::class] = [ | ||
__DIR__ . '/src/Route/Route.php', | ||
__DIR__ . '/src/RouteCollector.php', | ||
]; | ||
} | ||
|
||
(new ConfigSet80()) | ||
->setHeader($header) | ||
->enablePhpUnitRules() | ||
->setAdditionalSkips($skips) | ||
->configure($ecsConfig); | ||
}; | ||
HEADER) | ||
->enablePhpUnitRules() | ||
->setAdditionalSkips($skips); | ||
$paths = [ | ||
__FILE__, | ||
__DIR__ . '/src', | ||
__DIR__ . '/tests', | ||
]; | ||
|
||
if (!method_exists(ECSConfig::class, 'configure')) { | ||
return static function (ECSConfig $ecsConfig) use ($configSet, $paths): void { | ||
$ecsConfig->paths($paths); | ||
$ecsConfig->cacheDirectory('.ecs.cache'); | ||
|
||
$configSet->configure($ecsConfig); | ||
}; | ||
} | ||
|
||
return $configSet | ||
->configureBuilder() | ||
->withCache('.ecs.cache') | ||
->withPaths($paths); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* (c) 2017-2023 Julián Gutiérrez <[email protected]> | ||
* (c) 2017-2024 Julián Gutiérrez <[email protected]> | ||
* | ||
* @license BSD-3-Clause | ||
* @link https://github.com/juliangut/slim-routing | ||
|
Oops, something went wrong.