Skip to content

Commit 300255d

Browse files
committed
upgrade php-cs-fixer & phpstan
1 parent 2423a04 commit 300255d

File tree

129 files changed

+61
-840
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+61
-840
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,18 @@ jobs:
2626
- name: Run phpspec
2727
run: vendor/bin/phpspec run --config=phpspec.yml --no-interaction -vvv
2828

29+
- name: Install php-cs-fixer
30+
run: composer require --dev friendsofphp/php-cs-fixer:^3.0
31+
if: ${{ matrix.php-version == '8.3' }}
32+
2933
- name: Run php-cs-fixer
30-
run: vendor/bin/php-cs-fixer fix --config=.php_cs.dist --verbose --diff --dry-run
31-
if: ${{ matrix.php-version == '8.0' }}
34+
run: vendor/bin/php-cs-fixer check --verbose --diff
35+
if: ${{ matrix.php-version == '8.3' }}
3236

3337
- name: Install phpstan
34-
run: composer require --dev phpstan/phpstan:~0.12
35-
if: ${{ matrix.php-version == '8.0' || matrix.php-version == '8.1' }}
38+
run: composer require --dev phpstan/phpstan:^2.0
39+
if: ${{ matrix.php-version == '8.3' }}
3640

3741
- name: Run phpstan
38-
run: vendor/bin/phpstan analyse -c phpstan.neon
39-
if: ${{ matrix.php-version == '8.0' || matrix.php-version == '8.1' }}
42+
run: vendor/bin/phpstan analyse
43+
if: ${{ matrix.php-version == '8.3' }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/vendor
22
composer.phar
33
composer.lock
4-
.php_cs.cache
4+
.php-cs-fixer.cache
55
.DS_Store
66
Thumbs.db

.php_cs.dist renamed to .php-cs-fixer.dist.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
$config->setStrict()
1010
->setRule('general_phpdoc_annotation_remove', ['annotations' => ['author']])
11-
->setRule('native_function_invocation', true)
1211
->getFinder()
1312
->in(__DIR__)
1413
->exclude('vendor');

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
},
1515
"require-dev": {
1616
"friends-of-phpspec/phpspec-expect": "*",
17-
"friendsofphp/php-cs-fixer": "^2.0",
1817
"phpspec/phpspec": "^5.0 || ^6.0 || ^7.0",
19-
"rshop/php-cs-fixer-config": "^2.0"
18+
"rshop/php-cs-fixer-config": "^3.0"
2019
},
2120
"autoload": {
2221
"psr-4": {

phpstan.neon

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
parameters:
2-
level: max
2+
level: 8
33
paths:
44
- src
5+
ignoreErrors:
6+
- identifier: missingType.return

spec/Pohoda/AddressbookSpec.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* Licensed under the MIT License
66
* (c) RIESENIA.com
77
*/
8-
98
declare(strict_types=1);
109

1110
namespace spec\Riesenia\Pohoda;

spec/Pohoda/BankSpec.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* Licensed under the MIT License
66
* (c) RIESENIA.com
77
*/
8-
98
declare(strict_types=1);
109

1110
namespace spec\Riesenia\Pohoda;

spec/Pohoda/CashSlipSpec.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* Licensed under the MIT License
66
* (c) RIESENIA.com
77
*/
8-
98
declare(strict_types=1);
109

1110
namespace spec\Riesenia\Pohoda;

spec/Pohoda/CategorySpec.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* Licensed under the MIT License
66
* (c) RIESENIA.com
77
*/
8-
98
declare(strict_types=1);
109

1110
namespace spec\Riesenia\Pohoda;

spec/Pohoda/ContractSpec.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* Licensed under the MIT License
66
* (c) RIESENIA.com
77
*/
8-
98
declare(strict_types=1);
109

1110
namespace spec\Riesenia\Pohoda;

0 commit comments

Comments
 (0)