Skip to content

Commit edc3ee2

Browse files
authored
cleanup errors (#7826)
1 parent b018bd5 commit edc3ee2

File tree

3 files changed

+8
-35
lines changed

3 files changed

+8
-35
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"rector/type-perfect": "^2.1.2",
5757
"shipmonk/composer-dependency-analyser": "^1.8",
5858
"symplify/phpstan-extensions": "^12.0.2",
59-
"symplify/phpstan-rules": "^14.9.4",
59+
"symplify/phpstan-rules": "^14.9.11",
6060
"symplify/vendor-patches": "^11.5",
6161
"tomasvotruba/class-leak": "^2.1",
6262
"tomasvotruba/unused-public": "^2.1",

phpstan.neon

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ includes:
55
parameters:
66
level: 8
77

8-
reportUnmatchedIgnoredErrors: false
8+
# reportUnmatchedIgnoredErrors: false
9+
910
errorFormat: symplify
1011

1112
# see https://phpstan.org/writing-php-code/phpdoc-types#global-type-aliases
@@ -371,11 +372,6 @@ parameters:
371372

372373
- '#Method Rector\\Utils\\Rector\\RemoveRefactorDuplicatedNodeInstanceCheckRector\:\:getInstanceofNodeClass\(\) should return class\-string<PhpParser\\Node>\|null but returns class\-string#'
373374

374-
# helper classes for bin script
375-
-
376-
path: scripts
377-
identifier: symplify.multipleClassLikeInFile
378-
379375
# copied from /vendor, to keep as original as possible
380376
-
381377
identifier: missingType.iterableValue
@@ -406,9 +402,6 @@ parameters:
406402
- rules/DeadCode/Rector/ConstFetch/RemovePhpVersionIdCheckRector.php
407403
- rules/DeadCode/Rector/If_/UnwrapFutureCompatibleIfPhpVersionRector.php
408404

409-
# condition check, just to be sure
410-
- '#Method Rector\\Rector\\AbstractRector\:\:enterNode\(\) never returns 3 so it can be removed from the return type#'
411-
412405
# deprecated
413406
-
414407
identifier: public.method.unused
@@ -417,14 +410,7 @@ parameters:
417410
- rules/CodeQuality/ValueObject/KeyAndExpr.php
418411
-
419412
identifier: symplify.forbiddenExtendOfNonAbstractClass
420-
path: src/PhpParser/Node/FileNode.php
421-
-
422-
identifier: method.deprecatedClass
423-
path: src/PhpParser/Node/FileNode.php
424-
425-
-
426-
identifier: class.extendsDeprecatedClass
427-
path: src/PhpParser/Node/FileNode.php
413+
path: rules/Php81/Rector/Array_/FirstClassCallableRector.php
428414

429415
-
430416
identifier: public.classConstant.unused
@@ -442,35 +428,20 @@ parameters:
442428
- '#Rule Rector\\Php81\\Rector\\Array_\\FirstClassCallableRector must implements Rector\\VersionBonding\\Contract\\MinPhpVersionInterface#'
443429
- '#Register "Rector\\Php81\\Rector\\Array_\\FirstClassCallableRector" service to "php81\.php" config set#'
444430
- '#Class "Rector\\CodingStyle\\Rector\\String_\\SymplifyQuoteEscapeRector" is missing @see annotation with test case class reference#'
445-
- '#Access to constant on deprecated class Rector\\Php81\\Rector\\Array_\\FirstClassCallableRector#'
446431

447432
# BC layer for FileWithoutNamespace node
448-
- message: '#Use @see \\Rector\\PhpParser\\Node\\FileNode instead#'
449-
- '#BC layer for FileNode and FileWithoutNamespace compat, use FileNode instead#'
450433
-
451434
path: src/PhpParser/Node/CustomNode/FileWithoutNamespace.php
452435
identifier: symplify.forbiddenExtendOfNonAbstractClass
453-
-
454-
message: '#Only abstract classes can be extended#'
455-
path: rules/Php81/Rector/Array_/FirstClassCallableRector.php
456436

457-
- '#Method Rector\\Tests\\Issues\\FileWithoutNamespaceCompat\\Rector\\SubscribedToFileWithoutNamespaceRector\:\:refactor\(\) should return Rector\\PhpParser\\Node\\FileNode but returns Rector\\PhpParser\\Node\\CustomNode\\FileWithoutNamespace#'
458-
459-
# BC layer for FileWithoutNamespace node
460437
- message: '#Use @see \\Rector\\PhpParser\\Node\\FileNode instead#'
461-
- '#Class Rector\\PhpParser\\Node\\CustomNode\\FileWithoutNamespace extends final class Rector\\PhpParser\\Node\\FileNode#'
462-
-
463-
path: src/PhpParser/Node/CustomNode/FileWithoutNamespace.php
464-
identifier: symplify.forbiddenExtendOfNonAbstractClass
465438

466439
# false positive
467440
-
468441
identifier: phpstanApi.varTagAssumption
469442
path: rules/TypeDeclarationDocblocks/Rector/ClassMethod/AddReturnDocblockForDimFetchArrayFromAssignsRector.php
470443

471-
# bug, fix in symplify/phpstan-rules
444+
# @todo fix in phpstan-rules
472445
-
473446
identifier: symplify.noMissnamedDocTag
474-
paths:
475-
- rules/Php74/NodeAnalyzer/ClosureArrowFunctionAnalyzer.php
476-
- rules/TypeDeclarationDocblocks/TypeResolver/ConstantArrayTypeGeneralizer.php
447+
path: rules/TypeDeclarationDocblocks/TypeResolver/ConstantArrayTypeGeneralizer.php

rules/TypeDeclarationDocblocks/TypeResolver/ConstantArrayTypeGeneralizer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
final class ConstantArrayTypeGeneralizer
1818
{
1919
/**
20+
* @var int
21+
*
2022
* Using 10-level array @return docblocks makes code very hard to read,
2123
* lets limit it to reasonable level
2224
*/

0 commit comments

Comments
 (0)