Skip to content

Commit 90bbdf3

Browse files
committed
refactor: apply inspection
1 parent 213c975 commit 90bbdf3

28 files changed

+93
-123
lines changed

.gitattributes

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@
5151
/CHANGELOG.md export-ignore
5252
/composer-bump export-ignore
5353
/composer-dependency-analyser.php export-ignore
54+
/gitleaks-baseline.json export-ignore
5455
/monorepo-builder.php export-ignore
5556
/peck.json export-ignore
56-
/phpbench.json export-ignore
57-
/phpstan.neon export-ignore
57+
/phpbench.json.dist export-ignore
58+
/phpstan.neon.dist export-ignore
5859
/phpunit.xml.dist export-ignore
5960
/rector-*.php export-ignore
6061
/rector.php export-ignore

.github/workflows/lint-md.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ jobs:
1919
run: npm install -g @lint-md/cli
2020

2121
- name: Lint markdown
22-
run: lint-md --config .lintmdrc --suppress-warnings *.md .github/ docs/
22+
run: lint-md --suppress-warnings *.md .github/ docs/

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ jobs:
3737
run: composer install --no-interaction --prefer-dist --ansi -v
3838

3939
- name: Run phpstan
40-
run: composer phpstan
40+
run: composer phpstan:analyse

.github/workflows/rector.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
run: composer install --no-interaction --prefer-dist --ansi -v
3737

3838
- name: Run rector
39-
run: composer rector:dry-run
39+
run: composer rector:process-dry-run

.gitignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ vendor/
88

99
.DS_Store
1010
.env
11-
.php-cs-fixer.cache
12-
.phpunit.result.cache
11+
.php-cs-fixer.php
1312
/*.zip
1413
/laravel
1514
/tests.*
16-
clover.xml
1715
composer.lock
16+
phpbench.json
17+
phpstan.neon
1818
phpunit.xml
19-
psalm.xml
2019
soar.log
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22

3-
/** @noinspection PhpUnusedAliasInspection */
4-
53
declare(strict_types=1);
64

75
/**
@@ -283,7 +281,7 @@
283281
'static_private_method' => false,
284282
])))
285283
->setUsingCache(true)
286-
->setCacheFile(__DIR__.'/.build/php-cs-fixer/.php-cs-fixer.cache')
284+
->setCacheFile(\sprintf('%s/.build/php-cs-fixer/%s.cache', __DIR__, pathinfo(__FILE__, \PATHINFO_FILENAME)))
287285
->setUnsupportedPhpVersionAllowed(true)
288286
->setFinder(
289287
/**

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ composer require guanguans/soar-php --ansi -v
3939
```php
4040
<?php
4141

42-
/** @noinspection PhpUnhandledExceptionInspection */
4342
/** @noinspection SqlResolve */
44-
/** @noinspection SuspiciousAssignmentsInspection */
4543

4644
declare(strict_types=1);
4745

baselines/assign.propertyType.neon

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# total 1 error
2+
3+
parameters:
4+
ignoreErrors:
5+
-
6+
message: '#^Property Guanguans\\SoarPHP\\Soar\:\:\$binary \(string\) does not accept string\|false\.$#'
7+
count: 1
8+
path: ../src/Soar.php

baselines/loader.neon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# total 15 errors
1+
# total 6 errors
22

33
includes:
4+
- assign.propertyType.neon
45
- callable.nonCallable.neon
56
- complexity.functionLike.neon
67
- disallowed.function.neon
7-
- method.childParameterType.neon
88
- new.static.neon
99
- typePerfect.narrowPublicClassMethodParamType.neon

baselines/method.childParameterType.neon

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)