Skip to content

Commit

Permalink
cs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tbali0524 committed Sep 2, 2024
1 parent b3229cc commit 95f9988
Show file tree
Hide file tree
Showing 33 changed files with 310 additions and 331 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
tools: phpcs:3.10, php-cs-fixer:3.61, phpstan:1.11
tools: phpcs:3.10, php-cs-fixer:3.64, phpstan:1.12
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
7 changes: 3 additions & 4 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* php-cs-fixer configuration file.
*
* minimum version: ^3.61
* minimum version: ^3.64
*
* @see https://cs.symfony.com/doc/config.html
*/
Expand All @@ -21,10 +21,11 @@

return (new PhpCsFixer\Config())
->setRules([
'@PHP83Migration' => true,
'@PHP84Migration' => true,
'@PHP80Migration:risky' => true, // this also needs: ->setRiskyAllowed(true)
'@PhpCsFixer' => true, // includes @Symfony, @PER-CS2.0, @PSR12, @PSR2, @PSR1
'@PhpCsFixer:risky' => true, // includes @Symfony:risky, @PER-CS2.0:risky, @PSR12:risky
'@PHPUnit100Migration:risky'=> true,

// override some @Symfony rules
'blank_line_before_statement' => false,
Expand All @@ -43,13 +44,11 @@
'native_function_invocation' => false,
'no_trailing_whitespace_in_string' => false,
'psr_autoloading' => false,
'self_accessor' => false,
'string_length_to_empty' => false,

// override some @PhpCsFixer:risky rules
'comment_to_phpdoc' => false,
'strict_comparison' => false,
'strict_param' => false,
])
->setRiskyAllowed(true)
->setCacheFile(__DIR__ . '/.tools/.php-cs-fixer.cache')
Expand Down
2 changes: 1 addition & 1 deletion phpdoc.dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ minimum version: ^3.5
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.phpdoc.org https://docs.phpdoc.org/latest/phpdoc.xsd"
>
<title>Advent of Code solutions by TBali</title>
<title>Advent of Code solutions in PHP by TBali</title>
<paths>
<output>docs</output>
<cache>.tools/phpdoc/cache</cache>
Expand Down
4 changes: 2 additions & 2 deletions phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PHPStan configuration file.
#
# minimum version: ^1.11
# minimum version: ^1.12
#
# @see https://phpstan.org/config-reference
parameters:
Expand All @@ -17,7 +17,7 @@ parameters:
- vendor
ignoreErrors:
-
message: '#^(Static )?[Mm]ethod TBali[a-zA-Z0-9\\_]+::[a-zA-Z0-9_]+\(\) is unused.$#'
message: '#^(Static )?[Mm]ethod TBali[a-zA-Z0-9\\_]+::[a-zA-Z0-9_]+\(\) is unused\.$#'
identifier: method.unused
includes:
- phar://phpstan.phar/conf/bleedingEdge.neon
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PHPUnit configuration file.
minimum version: ^11.3
@see https://phpunit.readthedocs.io/en/11.0/configuration.html
@see https://phpunit.readthedocs.io/en/11.3/configuration.html
-->
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down
Loading

0 comments on commit 95f9988

Please sign in to comment.