From c094166ef35625e1a70af9d823bf0faad0730b6a Mon Sep 17 00:00:00 2001 From: Daniel Leech Date: Fri, 9 Aug 2024 08:15:18 +0100 Subject: [PATCH] Update phpstan --- .php-cs-fixer.dist.php | 2 +- .styleci.yml | 7 - composer.json | 4 +- phpstan-baseline.neon | 1790 ++--------------- phpstan.neon | 8 +- .../AssignmentToMissingPropertyDiagnostic.php | 1 + .../DeprecatedUsageDiagnosticProvider.php | 2 + .../Docblock/ClassGenericDiagnosticHelper.php | 1 + .../DocblockMissingClassGenericDiagnostic.php | 1 - .../Diagnostics/MissingReturnTypeProvider.php | 1 + .../UndefinedVariableDiagnostic.php | 2 +- .../UnresolvableNameDiagnostic.php | 1 + .../Reflection/AbstractReflectionClass.php | 1 + .../AbstractReflectionMethodCall.php | 2 +- .../Reflection/ClassInvocation.php | 1 + .../Reflection/ReflectionEnumCase.php | 1 - .../Reflection/ReflectionMatchExpression.php | 1 + .../Reflection/ReflectionTrait.php | 1 + .../Reflector/TolerantSourceCodeReflector.php | 1 - src/Core/ClassHierarchyResolver.php | 3 + src/Core/DiagnosticExample.php | 1 - .../InMemoryDiagnosticProvider.php | 1 + src/Core/DiagnosticSeverity.php | 3 + src/Core/DocBlock/PlainDocblock.php | 5 + src/Core/Inference/Assignments.php | 1 - src/Core/Inference/FunctionStubRegistry.php | 1 - src/Core/Inference/MemberTypeResolver.php | 2 + .../NodeContextFromMemberAccess.php | 1 - src/Core/Inference/Symbol.php | 12 + src/Core/Inference/TypeAssertion.php | 1 + src/Core/Inference/TypeCombinator.php | 1 - src/Core/Inference/Walker/IncludeWalker.php | 1 - .../Inference/Walker/TestAssertWalker.php | 2 - src/Core/Inference/Walker/VariableWalker.php | 1 - .../ChainReflectionMemberCollection.php | 2 - .../ClassLikeReflectionMemberCollection.php | 1 - .../Collection/ReflectionMemberCollection.php | 1 - src/Core/Reflection/ReflectionClassLike.php | 1 - .../Reflection/ReflectionDeclaredConstant.php | 4 + src/Core/Reflection/ReflectionMember.php | 3 + .../ClassReflector/MemonizedReflector.php | 5 + .../SourceCodeLocator/InternalStubs/Enum.php | 12 +- .../InternalStubs/GenericTypes.php | 196 +- src/Core/Type.php | 2 +- src/Core/Type/AggregateType.php | 1 + src/Core/Type/BitwiseOperable.php | 5 + src/Core/Type/ClassType.php | 1 - src/Core/Type/IntLiteralType.php | 1 - src/Core/Type/IntNegative.php | 1 + src/Core/Type/IntPositive.php | 1 + src/Core/Type/IntersectionType.php | 1 + src/Core/Type/IterableType.php | 1 + .../Type/Resolver/IterableTypeResolver.php | 1 + src/Core/TypeFactory.php | 1 - src/Core/Util/NodeUtil.php | 2 + .../Virtual/VirtualReflectionFunction.php | 1 - .../DocblockParserFactoryTest.php | 1 + .../ContextualSourceCodeReflectorTest.php | 2 + 58 files changed, 343 insertions(+), 1768 deletions(-) delete mode 100644 .styleci.yml diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 7ab0c03a8..29da0bf5c 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -3,7 +3,7 @@ use PhpCsFixer\Config; $finder = PhpCsFixer\Finder::create() - ->in('lib') + ->in('src') ->in('tests') ->exclude([ 'Workspace', diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index 4c127113d..000000000 --- a/.styleci.yml +++ /dev/null @@ -1,7 +0,0 @@ -enabled: - -disabled: - - align_double_arrow - - concat_without_spaces - - phpdoc_indent - - phpdoc_params diff --git a/composer.json b/composer.json index 325f2f50f..98e878187 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "phpactor/class-to-file": "~0.5.0", "phpactor/test-utils": "^1.1.5", "phpbench/phpbench": "dev-master", - "phpstan/phpstan": "~0.12.0", + "phpstan/phpstan": "^1.0", "phpunit/phpunit": "^9.0", "symfony/filesystem": "^6.0", "phpspec/prophecy-phpunit": "^2.0", @@ -50,7 +50,7 @@ "scripts": { "integrate": [ "./vendor/bin/php-cs-fixer fix --allow-risky=yes", - "./vendor/bin/phpstan analyse lib -c phpstan.neon", + "./vendor/bin/phpstan analyse --memory-limit=1G", "./vendor/bin/phpunit", "./vendor/bin/phpbench run --iterations=1", "./tests/Smoke/smoke_test.php --limit=100" diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 753667804..bb397fd4e 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,1867 +1,341 @@ parameters: ignoreErrors: - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\Phpactor\\\\MemberProvider\\\\DocblockMemberProvider\\:\\:provideMembers\\(\\) should return Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionMemberCollection\\ but returns Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionCollection\\\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\PsrLog\\\\ArrayLogger\\:\\:log\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" count: 1 - path: lib/Bridge/Phpactor/MemberProvider/DocblockMemberProvider.php - - - - message: "#^PHPDoc tag @implements contains generic type Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\ReflectionMemberProvider\\ but interface Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\ReflectionMemberProvider is not generic\\.$#" - count: 1 - path: lib/Bridge/Phpactor/MemberProvider/DocblockMemberProvider.php + path: src/Bridge/PsrLog/ArrayLogger.php - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\PsrLog\\\\ArrayLogger\\:\\:messages\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 - path: lib/Bridge/PsrLog/ArrayLogger.php - - - - message: "#^Property Phpactor\\\\WorseReflection\\\\Bridge\\\\PsrLog\\\\ArrayLogger\\:\\:\\$messages has no typehint specified\\.$#" - count: 1 - path: lib/Bridge/PsrLog/ArrayLogger.php - - - - message: "#^Instanceof between mixed and Microsoft\\\\PhpParser\\\\Node\\\\TraitSelectOrAliasClause will always evaluate to false\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Patch\\\\TolerantQualifiedNameResolver\\:\\:getResolvedName\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Patch\\\\TolerantQualifiedNameResolver\\:\\:getResolvedName\\(\\) has parameter \\$namespaceDefinition with no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Patch\\\\TolerantQualifiedNameResolver\\:\\:getResolvedName\\(\\) has parameter \\$node with no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Patch\\\\TolerantQualifiedNameResolver\\:\\:isConstantName\\(\\) has parameter \\$node with no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Patch\\\\TolerantQualifiedNameResolver\\:\\:tryResolveFromImportTable\\(\\) has parameter \\$node with no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Patch\\\\TolerantQualifiedNameResolver\\:\\:tryResolveFromImportTable\\(\\) should return null but returns Microsoft\\\\PhpParser\\\\ResolvedName\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - - - - message: "#^Result of && is always false\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - - - - message: "#^Parameter \\#1 \\$method of method Phpactor\\\\WorseReflection\\\\Core\\\\Util\\\\OriginalMethodResolver\\:\\:resolveOriginalMember\\(\\) expects Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionMember, \\$this\\(Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\AbstractReflectionClassMember\\) given\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/AbstractReflectionClassMember.php - - - - message: "#^Strict comparison using \\=\\=\\= between null and Microsoft\\\\PhpParser\\\\ResolvedName will always evaluate to false\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/AbstractReflectionClassMember.php - - - - message: "#^Method Microsoft\\\\PhpParser\\\\Node\\:\\:getText\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/AbstractReflectionMethodCall.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\AbstractReflectionMethodCall\\:\\:callExpression\\(\\) should return Microsoft\\\\PhpParser\\\\Node\\\\Expression\\\\CallExpression but returns Microsoft\\\\PhpParser\\\\Node\\|null\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/AbstractReflectionMethodCall.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\AbstractReflectionMethodCall\\:\\:name\\(\\) should return string but returns bool\\|string\\|null\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/AbstractReflectionMethodCall.php - - - - message: "#^Property Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\AbstractReflectionMethodCall\\:\\:\\$node \\(Microsoft\\\\PhpParser\\\\Node\\\\Expression\\\\MemberAccessExpression\\|Microsoft\\\\PhpParser\\\\Node\\\\Expression\\\\ScopedPropertyAccessExpression\\) does not accept Microsoft\\\\PhpParser\\\\Node\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/AbstractReflectionMethodCall.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:__construct\\(\\) has parameter \\$items with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:empty\\(\\) return type has no value type specified in iterable type Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:first\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:fromReflections\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:fromReflections\\(\\) has parameter \\$reflections with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:get\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:keys\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:last\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:merge\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:offsetExists\\(\\) has parameter \\$name with no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:offsetGet\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:offsetGet\\(\\) has parameter \\$name with no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:offsetSet\\(\\) has parameter \\$name with no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:offsetSet\\(\\) has parameter \\$value with no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:offsetUnset\\(\\) has parameter \\$name with no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/AbstractReflectionCollection.php - - - - message: "#^Property Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:\\$items type has no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/AbstractReflectionCollection.php - - - - message: "#^Unsafe usage of new static\\(\\)\\.$#" - count: 3 - path: lib/Bridge/TolerantParser/Reflection/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionClassCollection\\:\\:concrete\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionClassCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionClassCollection\\:\\:fromNode\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionClassCollection.php - - - - message: "#^Parameter \\#3 \\$node of class Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionClass constructor expects Microsoft\\\\PhpParser\\\\Node\\\\Statement\\\\ClassDeclaration, Microsoft\\\\PhpParser\\\\ClassLike&Microsoft\\\\PhpParser\\\\NamespacedNameInterface&Microsoft\\\\PhpParser\\\\Node given\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionClassCollection.php - - - - message: "#^Unsafe usage of new static\\(\\)\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionClassCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionConstantCollection\\:\\:fromClassDeclaration\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionConstantCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionConstantCollection\\:\\:fromInterfaceDeclaration\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionConstantCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionConstantCollection\\:\\:fromReflectionConstants\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionConstantCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionConstantCollection\\:\\:fromReflectionConstants\\(\\) has parameter \\$constants with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionConstantCollection.php - - - - message: "#^Unsafe usage of new static\\(\\)\\.$#" - count: 3 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionConstantCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionFunctionCollection\\:\\:fromNode\\(\\) return type has no value type specified in iterable type Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionFunctionCollection\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionFunctionCollection.php + path: src/Bridge/PsrLog/ArrayLogger.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionInterfaceCollection\\:\\:fromBaseClause\\(\\) has no return typehint specified\\.$#" + message: "#^Property Phpactor\\\\WorseReflection\\\\Bridge\\\\PsrLog\\\\ArrayLogger\\:\\:\\$messages has no type specified\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionInterfaceCollection.php + path: src/Bridge/PsrLog/ArrayLogger.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionInterfaceCollection\\:\\:fromBaseClause\\(\\) has parameter \\$baseClause with no typehint specified\\.$#" + message: "#^Call to method head\\(\\) on an unknown class Phpactor\\\\Name\\\\Name\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionInterfaceCollection.php + path: src/Bridge/TolerantParser/Diagnostics/UnresolvableNameDiagnostic.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionInterfaceCollection\\:\\:fromClassDeclaration\\(\\) has no return typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Diagnostics\\\\UnresolvableNameDiagnostic\\:\\:name\\(\\) has invalid return type Phpactor\\\\Name\\\\Name\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionInterfaceCollection.php + path: src/Bridge/TolerantParser/Diagnostics/UnresolvableNameDiagnostic.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionInterfaceCollection\\:\\:fromInterfaceDeclaration\\(\\) has no return typehint specified\\.$#" + message: "#^Parameter \\$name of method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Diagnostics\\\\UnresolvableNameDiagnostic\\:\\:__construct\\(\\) has invalid type Phpactor\\\\Name\\\\Name\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionInterfaceCollection.php + path: src/Bridge/TolerantParser/Diagnostics/UnresolvableNameDiagnostic.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionMemberCollection\\:\\:byVisibilities\\(\\) has parameter \\$visibilities with no value type specified in iterable type array\\.$#" + message: "#^Parameter \\$name of method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Diagnostics\\\\UnresolvableNameDiagnostic\\:\\:forClass\\(\\) has invalid type Phpactor\\\\Name\\\\Name\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionMemberCollection.php + path: src/Bridge/TolerantParser/Diagnostics/UnresolvableNameDiagnostic.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionMemberCollection\\:\\:methods\\(\\) should return Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionMethodCollection but returns Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionMemberCollection\\.$#" + message: "#^Parameter \\$name of method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Diagnostics\\\\UnresolvableNameDiagnostic\\:\\:forFunction\\(\\) has invalid type Phpactor\\\\Name\\\\Name\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionMemberCollection.php + path: src/Bridge/TolerantParser/Diagnostics/UnresolvableNameDiagnostic.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionMemberCollection\\:\\:properties\\(\\) should return Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionPropertyCollection but returns Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionMemberCollection\\.$#" + message: "#^Property Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Diagnostics\\\\UnresolvableNameDiagnostic\\:\\:\\$name has unknown class Phpactor\\\\Name\\\\Name as its type\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionMemberCollection.php + path: src/Bridge/TolerantParser/Diagnostics/UnresolvableNameDiagnostic.php - - message: "#^Unsafe usage of new static\\(\\)\\.$#" + message: "#^Call to static method fromString\\(\\) on an unknown class Phpactor\\\\Name\\\\FullyQualifiedName\\.$#" count: 2 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionMemberCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionMethodCollection\\:\\:fromClassDeclaration\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionMethodCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionMethodCollection\\:\\:fromEnumDeclaration\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionMethodCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionMethodCollection\\:\\:fromReflectionMethods\\(\\) has parameter \\$methods with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionMethodCollection.php + path: src/Bridge/TolerantParser/Diagnostics/UnresolvableNameProvider.php - - message: "#^Unsafe usage of new static\\(\\)\\.$#" - count: 5 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionMethodCollection.php - - - - message: "#^If condition is always true\\.$#" + message: "#^Property Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Diagnostics\\\\UnresolvableNameProvider\\:\\:\\$functionCache \\(array\\\\) does not accept array\\\\.$#" count: 2 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionParameterCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionParameterCollection\\:\\:fromFunctionDeclaration\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionParameterCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionParameterCollection\\:\\:fromMethodDeclaration\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionParameterCollection.php + path: src/Bridge/TolerantParser/Diagnostics/UnresolvableNameProvider.php - - message: "#^Unsafe usage of new static\\(\\)\\.$#" + message: "#^Expression on left side of \\?\\? is always null\\.$#" count: 2 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionParameterCollection.php - - - - message: "#^Argument of an invalid type Microsoft\\\\PhpParser\\\\Node\\\\DelimitedList\\\\ExpressionList supplied for foreach, only iterables are supported\\.$#" - count: 3 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionPropertyCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionPropertyCollection\\:\\:fromEnumDeclaration\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionPropertyCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionPropertyCollection\\:\\:fromTraitDeclaration\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionPropertyCollection.php + path: src/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionTraitCollection\\:\\:fromClassDeclaration\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionTraitCollection.php - - - - message: "#^Strict comparison using \\=\\=\\= between false and true will always evaluate to false\\.$#" + message: "#^Instanceof between mixed and Microsoft\\\\PhpParser\\\\Node\\\\TraitSelectOrAliasClause will always evaluate to false\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionTraitCollection.php + path: src/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - - message: "#^Unsafe usage of new static\\(\\)\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Patch\\\\TolerantQualifiedNameResolver\\:\\:getResolvedName\\(\\) has no return type specified\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/Collection/ReflectionTraitCollection.php + path: src/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - - message: "#^Method Microsoft\\\\PhpParser\\\\Node\\:\\:getText\\(\\) invoked with 1 parameter, 0 required\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Patch\\\\TolerantQualifiedNameResolver\\:\\:getResolvedName\\(\\) has parameter \\$namespaceDefinition with no type specified\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionArgument.php + path: src/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionArgument\\:\\:guessName\\(\\) should return string but returns bool\\|string\\|null\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Patch\\\\TolerantQualifiedNameResolver\\:\\:getResolvedName\\(\\) has parameter \\$node with no type specified\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionArgument.php + path: src/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionArgument\\:\\:value\\(\\) has no return typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Patch\\\\TolerantQualifiedNameResolver\\:\\:isConstantName\\(\\) has parameter \\$node with no type specified\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionArgument.php + path: src/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionClass\\:\\:constants\\(\\) should return Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionConstantCollection but returns Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionCollection\\\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Patch\\\\TolerantQualifiedNameResolver\\:\\:tryResolveFromImportTable\\(\\) has parameter \\$node with no type specified\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionClass.php + path: src/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionClass\\:\\:parent\\(\\) should return Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionClass\\|null but returns Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionClassLike\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Patch\\\\TolerantQualifiedNameResolver\\:\\:tryResolveFromImportTable\\(\\) should return null but returns Microsoft\\\\PhpParser\\\\ResolvedName\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionClass.php + path: src/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionClass\\:\\:traits\\(\\) should return iterable\\&Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionTraitCollection but returns Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionCollection\\\\.$#" + message: "#^Result of && is always false\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionClass.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 4 - path: lib/Bridge/TolerantParser/Reflection/ReflectionClass.php + path: src/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - - message: "#^Parameter \\#1 \\$serviceLocator of static method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionMemberCollection\\:\\:empty\\(\\) expects Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ServiceLocator, Phpactor\\\\WorseReflection\\\\Core\\\\ServiceLocator given\\.$#" + message: "#^Variable \\$resolvedName on left side of \\?\\? always exists and is always null\\.$#" count: 2 - path: lib/Bridge/TolerantParser/Reflection/ReflectionClass.php - - - - message: "#^Property Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionClass\\:\\:\\$ancestors type has no value type specified in iterable type Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionClassCollection\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionClass.php - - - - message: "#^Strict comparison using \\=\\=\\= between false and true will always evaluate to false\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionClass.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionFunction\\:\\:body\\(\\) should return Phpactor\\\\WorseReflection\\\\Core\\\\NodeText but return statement is missing\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionFunction.php - - - - message: "#^If condition is always true\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionInterface.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionInterface\\:\\:methods\\(\\) should return Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionMethodCollection but returns Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionCollection\\\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionInterface.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionInterface\\:\\:parents\\(\\) return type has no value type specified in iterable type Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionInterfaceCollection\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionInterface.php - - - - message: "#^Property Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionInterface\\:\\:\\$methods has no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionInterface.php - - - - message: "#^Property Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionInterface\\:\\:\\$parents has no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionInterface.php - - - - message: "#^Access to an undefined property Microsoft\\\\PhpParser\\\\Node\\\\Statement\\\\CompoundStatementNode\\|Microsoft\\\\PhpParser\\\\Token\\:\\:\\$statements\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionMethod.php - - - - message: "#^Strict comparison using \\=\\=\\= between null and Microsoft\\\\PhpParser\\\\ResolvedName will always evaluate to false\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionMethod.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionOffset\\:\\:fromFrameAndSymbolContext\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionOffset.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionOffset\\:\\:fromFrameAndSymbolContext\\(\\) has parameter \\$frame with no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionOffset.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionOffset\\:\\:fromFrameAndSymbolContext\\(\\) has parameter \\$symbolContext with no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionOffset.php + path: src/Bridge/TolerantParser/Patch/TolerantQualifiedNameResolver.php - message: "#^Strict comparison using \\=\\=\\= between null and Microsoft\\\\PhpParser\\\\ResolvedName will always evaluate to false\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionProperty.php + path: src/Bridge/TolerantParser/Reflection/AbstractReflectionClassMember.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionScope\\:\\:resolveFullyQualifiedName\\(\\) has parameter \\$type with no typehint specified\\.$#" + message: "#^Property Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionMethodCall\\:\\:\\$node is unused\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionScope.php - - - - message: "#^Parameter \\#3 \\$reflectionTrait of static method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\Collection\\\\ReflectionMethodCollection\\:\\:fromTraitDeclaration\\(\\) expects Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\AbstractReflectionClass, Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionClassLike given\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/ReflectionTrait.php + path: src/Bridge/TolerantParser/Reflection/ReflectionMethodCall.php - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\TraitImport\\\\TraitImport\\:\\:__construct\\(\\) has parameter \\$traitAliases with no value type specified in iterable type array\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/TraitImport/TraitImport.php + path: src/Bridge/TolerantParser/Reflection/TraitImport/TraitImport.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\TraitImport\\\\TraitImport\\:\\:getAlias\\(\\) has parameter \\$name with no typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\TraitImport\\\\TraitImport\\:\\:getAlias\\(\\) has parameter \\$name with no type specified\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/TraitImport/TraitImport.php + path: src/Bridge/TolerantParser/Reflection/TraitImport/TraitImport.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\TraitImport\\\\TraitImport\\:\\:hasAliasFor\\(\\) has parameter \\$name with no typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\TraitImport\\\\TraitImport\\:\\:hasAliasFor\\(\\) has parameter \\$name with no type specified\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/TraitImport/TraitImport.php + path: src/Bridge/TolerantParser/Reflection/TraitImport/TraitImport.php - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\TraitImport\\\\TraitImport\\:\\:traitAliases\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/TraitImport/TraitImport.php - - - - message: "#^Property Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\TraitImport\\\\TraitImport\\:\\:\\$traitAliases type has no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/TraitImport/TraitImport.php + path: src/Bridge/TolerantParser/Reflection/TraitImport/TraitImport.php - message: "#^Argument of an invalid type Microsoft\\\\PhpParser\\\\Node\\\\DelimitedList\\\\TraitSelectOrAliasClauseList supplied for foreach, only iterables are supported\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflection/TraitImport/TraitImports.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\TraitImport\\\\TraitImports\\:\\:has\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/TraitImport/TraitImports.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\TraitImport\\\\TraitImports\\:\\:visiblity\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/TraitImport/TraitImports.php - - - - message: "#^Property Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\TraitImport\\\\TraitImports\\:\\:\\$imports has no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/TraitImport/TraitImports.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\TypeResolver\\\\DeclaredMemberTypeResolver\\:\\:doResolve\\(\\) has parameter \\$tolerantType with no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/TypeResolver/DeclaredMemberTypeResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\TypeResolver\\\\DeclaredMemberTypeResolver\\:\\:resolve\\(\\) has parameter \\$tolerantType with no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflection/TypeResolver/DeclaredMemberTypeResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflector\\\\TolerantSourceCodeReflector\\:\\:reflectClassesIn\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflector/TolerantSourceCodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflector\\\\TolerantSourceCodeReflector\\:\\:reflectFunctionsIn\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflector/TolerantSourceCodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflector\\\\TolerantSourceCodeReflector\\:\\:reflectMethodCall\\(\\) has parameter \\$offset with no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflector/TolerantSourceCodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflector\\\\TolerantSourceCodeReflector\\:\\:reflectNode\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflector/TolerantSourceCodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflector\\\\TolerantSourceCodeReflector\\:\\:reflectNode\\(\\) has parameter \\$offset with no typehint specified\\.$#" - count: 1 - path: lib/Bridge/TolerantParser/Reflector/TolerantSourceCodeReflector.php + path: src/Bridge/TolerantParser/Reflection/TraitImport/TraitImports.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflector\\\\TolerantSourceCodeReflector\\:\\:reflectNode\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\TraitImport\\\\TraitImports\\:\\:visiblity\\(\\) has no return type specified\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflector/TolerantSourceCodeReflector.php + path: src/Bridge/TolerantParser/Reflection/TraitImport/TraitImports.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflector\\\\TolerantSourceCodeReflector\\:\\:reflectOffset\\(\\) has parameter \\$offset with no typehint specified\\.$#" + message: "#^PHPDoc tag @var above a method has no effect\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflector/TolerantSourceCodeReflector.php + path: src/Core/Cache/TtlCache.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflector\\\\TolerantSourceCodeReflector\\:\\:reflectOffset\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\DefaultValue\\:\\:__construct\\(\\) has parameter \\$value with no type specified\\.$#" count: 1 - path: lib/Bridge/TolerantParser/Reflector/TolerantSourceCodeReflector.php + path: src/Core/DefaultValue.php - - message: "#^Array \\(array\\\\) does not accept float\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\DefaultValue\\:\\:fromValue\\(\\) has parameter \\$value with no type specified\\.$#" count: 1 - path: lib/Core/Cache/TtlCache.php + path: src/Core/DefaultValue.php - - message: "#^Parameter \\#1 \\$now of method Phpactor\\\\WorseReflection\\\\Core\\\\Cache\\\\TtlCache\\:\\:purgeExpired\\(\\) expects string, float given\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\DefaultValue\\:\\:value\\(\\) has no return type specified\\.$#" count: 1 - path: lib/Core/Cache/TtlCache.php + path: src/Core/DefaultValue.php - - message: "#^Property Phpactor\\\\WorseReflection\\\\Core\\\\Cache\\\\TtlCache\\:\\:\\$ticker has no typehint specified\\.$#" + message: "#^Property Phpactor\\\\WorseReflection\\\\Core\\\\DefaultValue\\:\\:\\$undefined has no type specified\\.$#" count: 1 - path: lib/Core/Cache/TtlCache.php + path: src/Core/DefaultValue.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\DefaultValue\\:\\:__construct\\(\\) has parameter \\$value with no typehint specified\\.$#" - count: 1 - path: lib/Core/DefaultValue.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\DefaultValue\\:\\:fromValue\\(\\) has parameter \\$value with no typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\DocBlock\\\\DocBlockInspector\\:\\:typesForMethod\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 - path: lib/Core/DefaultValue.php + path: src/Core/DocBlock/DocBlockInspector.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\DefaultValue\\:\\:value\\(\\) has no return typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\LocalAssignments\\:\\:fromArray\\(\\) has parameter \\$assignments with no value type specified in iterable type array\\.$#" count: 1 - path: lib/Core/DefaultValue.php + path: src/Core/Inference/LocalAssignments.php - - message: "#^Property Phpactor\\\\WorseReflection\\\\Core\\\\DefaultValue\\:\\:\\$undefined has no typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\MemberTypeResolver\\:\\:memberType\\(\\) has no return type specified\\.$#" count: 1 - path: lib/Core/DefaultValue.php + path: src/Core/Inference/MemberTypeResolver.php - - message: "#^Property Phpactor\\\\WorseReflection\\\\Core\\\\DefaultValue\\:\\:\\$value has no typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\PropertyAssignments\\:\\:create\\(\\) has no return type specified\\.$#" count: 1 - path: lib/Core/DefaultValue.php + path: src/Core/Inference/PropertyAssignments.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\DocBlock\\\\DocBlockInspector\\:\\:typesForMethod\\(\\) return type has no value type specified in iterable type array\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\PropertyAssignments\\:\\:fromArray\\(\\) has parameter \\$assignments with no value type specified in iterable type array\\.$#" count: 1 - path: lib/Core/DocBlock/DocBlockInspector.php + path: src/Core/Inference/PropertyAssignments.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\DocBlock\\\\DocBlockVars\\:\\:__construct\\(\\) has parameter \\$vars with no value type specified in iterable type array\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Name\\:\\:fromParts\\(\\) has parameter \\$parts with no value type specified in iterable type array\\.$#" count: 1 - path: lib/Core/DocBlock/DocBlockVars.php + path: src/Core/Name.php - - message: "#^Property Phpactor\\\\WorseReflection\\\\Core\\\\DocBlock\\\\DocBlockVars\\:\\:\\$vars type has no value type specified in iterable type array\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Name\\:\\:prepend\\(\\) has parameter \\$name with no type specified\\.$#" count: 1 - path: lib/Core/DocBlock/DocBlockVars.php + path: src/Core/Name.php - - message: "#^Unsafe usage of new static\\(\\)\\.$#" - count: 6 - path: lib/Core/Inference/Assignments.php - - - - message: "#^If condition is always true\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Name\\:\\:prepend\\(\\) should return static\\(Phpactor\\\\WorseReflection\\\\Core\\\\Name\\) but returns Phpactor\\\\WorseReflection\\\\Core\\\\Name\\.$#" count: 1 - path: lib/Core/Inference/ExpressionEvaluator.php + path: src/Core/Name.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\ExpressionEvaluator\\:\\:evaluate\\(\\) has no return typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Name\\:\\:substitute\\(\\) has parameter \\$alias with no type specified\\.$#" count: 1 - path: lib/Core/Inference/ExpressionEvaluator.php + path: src/Core/Name.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\ExpressionEvaluator\\:\\:evaluate\\(\\) has parameter \\$node with no typehint specified\\.$#" + message: "#^Class Phpactor\\\\WorseReflection\\\\Core\\\\NameImports implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#" count: 1 - path: lib/Core/Inference/ExpressionEvaluator.php + path: src/Core/NameImports.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\ExpressionEvaluator\\:\\:walkNumericLiteral\\(\\) has no return typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\NameImports\\:\\:__construct\\(\\) has parameter \\$nameImports with no type specified\\.$#" count: 1 - path: lib/Core/Inference/ExpressionEvaluator.php + path: src/Core/NameImports.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\ExpressionEvaluator\\:\\:walkParenthesizedExpression\\(\\) has no return typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\NameImports\\:\\:fromNames\\(\\) has parameter \\$nameImports with no value type specified in iterable type array\\.$#" count: 1 - path: lib/Core/Inference/ExpressionEvaluator.php + path: src/Core/NameImports.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\ExpressionEvaluator\\:\\:walkPostfixUpdateExpression\\(\\) has no return typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\NameImports\\:\\:getByAlias\\(\\) has no return type specified\\.$#" count: 1 - path: lib/Core/Inference/ExpressionEvaluator.php + path: src/Core/NameImports.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\ExpressionEvaluator\\:\\:walkPrefixUpdateExpression\\(\\) has no return typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\NameImports\\:\\:getIterator\\(\\) return type with generic class ArrayIterator does not specify its types\\: TKey, TValue$#" count: 1 - path: lib/Core/Inference/ExpressionEvaluator.php + path: src/Core/NameImports.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\ExpressionEvaluator\\:\\:walkReservedWord\\(\\) has no return typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\NameImports\\:\\:hasAlias\\(\\) has no return type specified\\.$#" count: 1 - path: lib/Core/Inference/ExpressionEvaluator.php + path: src/Core/NameImports.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\ExpressionEvaluator\\:\\:walkStringLiteral\\(\\) has no return typehint specified\\.$#" + message: "#^Property Phpactor\\\\WorseReflection\\\\Core\\\\NameImports\\:\\:\\$nameImports has no type specified\\.$#" count: 1 - path: lib/Core/Inference/ExpressionEvaluator.php + path: src/Core/NameImports.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\ExpressionEvaluator\\:\\:walkTernary\\(\\) has no return typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\NodeText\\:\\:__construct\\(\\) has parameter \\$nodeText with no type specified\\.$#" count: 1 - path: lib/Core/Inference/ExpressionEvaluator.php + path: src/Core/NodeText.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\ExpressionEvaluator\\:\\:walkUnaryOpExpression\\(\\) has no return typehint specified\\.$#" + message: "#^Parameter \\#1 \\$iterator of method AppendIterator\\\\>\\:\\:append\\(\\) expects Iterator\\, Traversable\\ given\\.$#" count: 1 - path: lib/Core/Inference/ExpressionEvaluator.php + path: src/Core/Reflection/Collection/ChainReflectionMemberCollection.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\ExpressionEvaluator\\:\\:walkVariable\\(\\) has no return typehint specified\\.$#" + message: "#^Class Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionConstant not found\\.$#" count: 1 - path: lib/Core/Inference/ExpressionEvaluator.php + path: src/Core/Reflection/Collection/HomogeneousReflectionMemberCollection.php - - message: "#^Negated boolean expression is always false\\.$#" + message: "#^Parameter \\#1 \\$items of class Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionConstantCollection constructor expects array\\, array\\ given\\.$#" count: 1 - path: lib/Core/Inference/ExpressionEvaluator.php + path: src/Core/Reflection/Collection/HomogeneousReflectionMemberCollection.php - - message: "#^Parameter \\#1 \\$haystack of function strpos expects string, float given\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionSourceCode\\:\\:findClass\\(\\) has no return type specified\\.$#" count: 1 - path: lib/Core/Inference/ExpressionEvaluator.php + path: src/Core/Reflection/ReflectionSourceCode.php - - message: "#^Unreachable statement \\- code above always terminates\\.$#" + message: "#^Property Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\ClassReflector\\\\MemonizedReflector\\:\\:\\$innerReflector is never read, only written\\.$#" count: 1 - path: lib/Core/Inference/ExpressionEvaluator.php + path: src/Core/Reflector/ClassReflector/MemonizedReflector.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Frame\\:\\:__construct\\(\\) has parameter \\$problems with no value type specified in iterable type Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Problems\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CompositeReflector\\:\\:reflectMethodCall\\(\\) has parameter \\$offset with no type specified\\.$#" count: 1 - path: lib/Core/Inference/Frame.php + path: src/Core/Reflector/CompositeReflector.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Frame\\:\\:children\\(\\) return type has no value type specified in iterable type array\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CompositeReflector\\:\\:reflectNode\\(\\) has parameter \\$offset with no type specified\\.$#" count: 1 - path: lib/Core/Inference/Frame.php + path: src/Core/Reflector/CompositeReflector.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Frame\\:\\:problems\\(\\) return type has no value type specified in iterable type Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Problems\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CompositeReflector\\:\\:reflectOffset\\(\\) has parameter \\$offset with no type specified\\.$#" count: 1 - path: lib/Core/Inference/Frame.php + path: src/Core/Reflector/CompositeReflector.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Frame\\:\\:reduce\\(\\) has no return typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CoreReflector\\:\\:reflectNode\\(\\) has parameter \\$offset with no type specified\\.$#" count: 1 - path: lib/Core/Inference/Frame.php + path: src/Core/Reflector/CoreReflector.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Frame\\:\\:reduce\\(\\) has parameter \\$initial with no typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CoreReflector\\:\\:reflectNode\\(\\) has parameter \\$sourceCode with no type specified\\.$#" count: 1 - path: lib/Core/Inference/Frame.php + path: src/Core/Reflector/CoreReflector.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Frame\\:\\:root\\(\\) has no return typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\SourceCode\\\\ContextualSourceCodeReflector\\:\\:reflectMethodCall\\(\\) has parameter \\$offset with no type specified\\.$#" count: 1 - path: lib/Core/Inference/Frame.php + path: src/Core/Reflector/SourceCode/ContextualSourceCodeReflector.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Frame\\:\\:withLocals\\(\\) has no return typehint specified\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\SourceCode\\\\ContextualSourceCodeReflector\\:\\:reflectNode\\(\\) has parameter \\$offset with no type specified\\.$#" count: 1 - path: lib/Core/Inference/Frame.php + path: src/Core/Reflector/SourceCode/ContextualSourceCodeReflector.php - - message: "#^Property Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Frame\\:\\:\\$problems type has no value type specified in iterable type Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Problems\\.$#" + message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\SourceCode\\\\ContextualSourceCodeReflector\\:\\:reflectOffset\\(\\) has parameter \\$offset with no type specified\\.$#" count: 1 - path: lib/Core/Inference/Frame.php + path: src/Core/Reflector/SourceCode/ContextualSourceCodeReflector.php - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\FrameBuilder\\:\\:resolveNode\\(\\) has parameter \\$node with no typehint specified\\.$#" + message: "#^Property Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\VirtualReflectionMethod\\:\\:\\$type is unused\\.$#" count: 1 - path: lib/Core/Inference/FrameBuilder.php + path: src/Core/Virtual/VirtualReflectionMethod.php - - message: "#^Instanceof between Microsoft\\\\PhpParser\\\\Node\\\\Expression and Microsoft\\\\PhpParser\\\\Node\\\\QualifiedName will always evaluate to false\\.$#" - count: 1 - path: lib/Core/Inference/FrameBuilder/AbstractInstanceOfWalker.php + message: "#^Cannot use array destructuring on Phpactor\\\\WorseReflection\\\\Core\\\\SourceCodeLocator\\.$#" + count: 2 + path: src/ReflectorBuilder.php - - message: "#^Unreachable statement \\- code above always terminates\\.$#" + message: "#^Parameter \\#1 \\$callback of function array_map expects \\(callable\\(Phpactor\\\\WorseReflection\\\\Core\\\\SourceCodeLocator\\)\\: mixed\\)\\|null, Closure\\(array\\)\\: mixed given\\.$#" count: 1 - path: lib/Core/Inference/FrameBuilder/AbstractInstanceOfWalker.php + path: src/ReflectorBuilder.php - - message: "#^Else branch is unreachable because previous condition is always true\\.$#" + message: "#^Property Phpactor\\\\WorseReflection\\\\ReflectorBuilder\\:\\:\\$locators \\(array\\\\) does not accept array\\\\|Phpactor\\\\WorseReflection\\\\Core\\\\SourceCodeLocator\\>\\.$#" count: 1 - path: lib/Core/Inference/FrameBuilder/AssignmentWalker.php - - - - message: "#^Method Microsoft\\\\PhpParser\\\\Node\\:\\:getText\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: lib/Core/Inference/FrameBuilder/AssignmentWalker.php - - - - message: "#^Parameter \\#1 \\$symbolName of method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolFactory\\:\\:context\\(\\) expects string, bool\\|string\\|null given\\.$#" - count: 3 - path: lib/Core/Inference/FrameBuilder/AssignmentWalker.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\FrameBuilder\\\\FunctionLikeWalker\\:\\:functionName\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/FrameBuilder/FunctionLikeWalker.php - - - - message: "#^Parameter \\#1 \\$symbolName of method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolFactory\\:\\:context\\(\\) expects string, bool\\|string\\|null given\\.$#" - count: 1 - path: lib/Core/Inference/FrameBuilder/FunctionLikeWalker.php - - - - message: "#^Parameter \\#3 \\$node of method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\FrameBuilder\\\\FunctionLikeWalker\\:\\:walkFunctionLike\\(\\) expects Microsoft\\\\PhpParser\\\\Node\\\\Expression\\\\AnonymousFunctionCreationExpression\\|Microsoft\\\\PhpParser\\\\Node\\\\Statement\\\\FunctionDeclaration, Microsoft\\\\PhpParser\\\\FunctionLike&Microsoft\\\\PhpParser\\\\Node given\\.$#" - count: 1 - path: lib/Core/Inference/FrameBuilder/FunctionLikeWalker.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\FrameBuilder\\\\IncludeWalker\\:\\:processAssignment\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/FrameBuilder/IncludeWalker.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: lib/Core/Inference/FrameBuilder/IncludeWalker.php - - - - message: "#^Parameter \\#1 \\$fileContents of method Microsoft\\\\PhpParser\\\\Parser\\:\\:parseSourceFile\\(\\) expects string, string\\|false given\\.$#" - count: 1 - path: lib/Core/Inference/FrameBuilder/IncludeWalker.php - - - - message: "#^Parameter \\#1 \\$name of method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Assignments\\:\\:byName\\(\\) expects string, bool\\|string\\|null given\\.$#" - count: 1 - path: lib/Core/Inference/FrameBuilder/IncludeWalker.php - - - - message: "#^Argument of an invalid type array\\\\|Microsoft\\\\PhpParser\\\\Node\\\\StatementNode supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: lib/Core/Inference/FrameBuilder/InstanceOfWalker.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\FrameBuilder\\\\InstanceOfWalker\\:\\:existingOrStripType\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/FrameBuilder/InstanceOfWalker.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\FrameBuilder\\\\InstanceOfWalker\\:\\:mergeTypes\\(\\) has parameter \\$variables with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Inference/FrameBuilder/InstanceOfWalker.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\FrameBuilder\\\\InstanceOfWalker\\:\\:mergeTypes\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Inference/FrameBuilder/InstanceOfWalker.php - - - - message: "#^Strict comparison using \\=\\=\\= between false and true will always evaluate to false\\.$#" - count: 1 - path: lib/Core/Inference/FrameBuilder/InstanceOfWalker.php - - - - message: "#^Property Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\FrameBuilder\\\\VariableWalker\\:\\:\\$injectedTypes type has no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Inference/FrameBuilder/VariableWalker.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\FullyQualifiedNameResolver\\:\\:currentClass\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/FullyQualifiedNameResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\FullyQualifiedNameResolver\\:\\:isFullyQualified\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/FullyQualifiedNameResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\FullyQualifiedNameResolver\\:\\:isFunctionCall\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/FullyQualifiedNameResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\FullyQualifiedNameResolver\\:\\:isUseDefinition\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/FullyQualifiedNameResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\FullyQualifiedNameResolver\\:\\:parentClass\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/FullyQualifiedNameResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\FullyQualifiedNameResolver\\:\\:resolve\\(\\) has parameter \\$type with no typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/FullyQualifiedNameResolver.php - - - - message: "#^Strict comparison using \\=\\=\\= between null and Microsoft\\\\PhpParser\\\\Node\\\\Statement\\\\ClassDeclaration will always evaluate to false\\.$#" - count: 1 - path: lib/Core/Inference/FullyQualifiedNameResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\LocalAssignments\\:\\:create\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/LocalAssignments.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\LocalAssignments\\:\\:fromArray\\(\\) has parameter \\$assignments with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Inference/LocalAssignments.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\MemberTypeResolver\\:\\:memberType\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/MemberTypeResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\NodeReflector\\:\\:reflectMemberAccessExpression\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/NodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\NodeReflector\\:\\:reflectMethodCall\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/NodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\NodeReflector\\:\\:reflectNode\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/NodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\NodeReflector\\:\\:reflectScopedPropertyAccessExpression\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/NodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\NodeReflector\\:\\:reflectStaticMethodCall\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/NodeReflector.php - - - - message: "#^Parameter \\#2 \\$node of method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\NodeReflector\\:\\:reflectMethodCall\\(\\) expects Microsoft\\\\PhpParser\\\\Node\\\\Expression\\\\MemberAccessExpression, Microsoft\\\\PhpParser\\\\Node given\\.$#" - count: 1 - path: lib/Core/Inference/NodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Problems\\:\\:__construct\\(\\) has parameter \\$problems with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Inference/Problems.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Problems\\:\\:create\\(\\) return type has no value type specified in iterable type Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Problems\\.$#" - count: 1 - path: lib/Core/Inference/Problems.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Problems\\:\\:merge\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/Problems.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Problems\\:\\:merge\\(\\) has parameter \\$problems with no value type specified in iterable type Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Problems\\.$#" - count: 1 - path: lib/Core/Inference/Problems.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Problems\\:\\:toArray\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Inference/Problems.php - - - - message: "#^Property Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Problems\\:\\:\\$problems type has no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Inference/Problems.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\PropertyAssignments\\:\\:create\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/PropertyAssignments.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\PropertyAssignments\\:\\:fromArray\\(\\) has parameter \\$assignments with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Inference/PropertyAssignments.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolContext\\:\\:__construct\\(\\) has parameter \\$value with no typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContext.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolContext\\:\\:fromType\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContext.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolContext\\:\\:fromTypeAndValue\\(\\) has parameter \\$value with no typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContext.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolContext\\:\\:issues\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContext.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolContext\\:\\:name\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContext.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolContext\\:\\:value\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContext.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolContext\\:\\:withScope\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContext.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolContext\\:\\:withValue\\(\\) has parameter \\$value with no typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContext.php - - - - message: "#^If condition is always true\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContextResolver.php - - - - message: "#^Method Microsoft\\\\PhpParser\\\\Node\\:\\:getText\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContextResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolContextResolver\\:\\:_resolveNode\\(\\) has parameter \\$node with no typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContextResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolContextResolver\\:\\:classTypeFromNode\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContextResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolContextResolver\\:\\:getClassLikeAncestor\\(\\) should return Microsoft\\\\PhpParser\\\\Node\\\\Statement\\\\ClassDeclaration\\|Microsoft\\\\PhpParser\\\\Node\\\\Statement\\\\InterfaceDeclaration\\|Microsoft\\\\PhpParser\\\\Node\\\\Statement\\\\TraitDeclaration but returns Microsoft\\\\PhpParser\\\\Node\\|null\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContextResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolContextResolver\\:\\:resolveNode\\(\\) has parameter \\$node with no typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContextResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolContextResolver\\:\\:resolveObjectCreationExpression\\(\\) has parameter \\$node with no typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContextResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolContextResolver\\:\\:resolveParenthesizedExpression\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContextResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolContextResolver\\:\\:resolvePropertyVariable\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContextResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolContextResolver\\:\\:resolveVariable\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContextResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolContextResolver\\:\\:resolveVariableName\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/SymbolContextResolver.php - - - - message: "#^Parameter \\#1 \\$symbolName of method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolFactory\\:\\:context\\(\\) expects string, bool\\|string\\|null given\\.$#" - count: 3 - path: lib/Core/Inference/SymbolContextResolver.php - - - - message: "#^Strict comparison using \\=\\=\\= between null and Microsoft\\\\PhpParser\\\\Node\\\\Statement\\\\ClassDeclaration\\|Microsoft\\\\PhpParser\\\\Node\\\\Statement\\\\InterfaceDeclaration\\|Microsoft\\\\PhpParser\\\\Node\\\\Statement\\\\TraitDeclaration will always evaluate to false\\.$#" - count: 2 - path: lib/Core/Inference/SymbolContextResolver.php - - - - message: "#^Unreachable statement \\- code above always terminates\\.$#" - count: 2 - path: lib/Core/Inference/SymbolContextResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\SymbolFactory\\:\\:contextFromParameters\\(\\) has parameter \\$value with no typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/SymbolFactory.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Variable\\:\\:isNamed\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/Variable.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Variable\\:\\:withOffset\\(\\) has parameter \\$offset with no typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/Variable.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Inference\\\\Variable\\:\\:withTypes\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Inference/Variable.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Name\\:\\:__construct\\(\\) has parameter \\$parts with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Name.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Name\\:\\:fromParts\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Name.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Name\\:\\:fromParts\\(\\) has parameter \\$parts with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Name.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Name\\:\\:fromUnknown\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Name.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Name\\:\\:fromUnknown\\(\\) has parameter \\$value with no typehint specified\\.$#" - count: 1 - path: lib/Core/Name.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Name\\:\\:head\\(\\) should return static\\(Phpactor\\\\WorseReflection\\\\Core\\\\Name\\) but returns Phpactor\\\\WorseReflection\\\\Core\\\\Name\\.$#" - count: 1 - path: lib/Core/Name.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Name\\:\\:prepend\\(\\) has parameter \\$name with no typehint specified\\.$#" - count: 1 - path: lib/Core/Name.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Name\\:\\:prepend\\(\\) should return static\\(Phpactor\\\\WorseReflection\\\\Core\\\\Name\\) but returns Phpactor\\\\WorseReflection\\\\Core\\\\Name\\.$#" - count: 1 - path: lib/Core/Name.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Name\\:\\:substitute\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Name.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Name\\:\\:substitute\\(\\) has parameter \\$alias with no typehint specified\\.$#" - count: 1 - path: lib/Core/Name.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Name\\:\\:tail\\(\\) should return static\\(Phpactor\\\\WorseReflection\\\\Core\\\\Name\\) but returns Phpactor\\\\WorseReflection\\\\Core\\\\Name\\.$#" - count: 1 - path: lib/Core/Name.php - - - - message: "#^Property Phpactor\\\\WorseReflection\\\\Core\\\\Name\\:\\:\\$parts has no typehint specified\\.$#" - count: 1 - path: lib/Core/Name.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\NameImports\\:\\:__construct\\(\\) has parameter \\$nameImports with no typehint specified\\.$#" - count: 1 - path: lib/Core/NameImports.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\NameImports\\:\\:fromNames\\(\\) has parameter \\$nameImports with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/NameImports.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\NameImports\\:\\:fromNames\\(\\) return type has no value type specified in iterable type Phpactor\\\\WorseReflection\\\\Core\\\\NameImports\\.$#" - count: 1 - path: lib/Core/NameImports.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\NameImports\\:\\:getByAlias\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/NameImports.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\NameImports\\:\\:hasAlias\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/NameImports.php - - - - message: "#^Property Phpactor\\\\WorseReflection\\\\Core\\\\NameImports\\:\\:\\$nameImports has no typehint specified\\.$#" - count: 1 - path: lib/Core/NameImports.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\NodeText\\:\\:__construct\\(\\) has parameter \\$nodeText with no typehint specified\\.$#" - count: 1 - path: lib/Core/NodeText.php - - - - message: "#^Property Phpactor\\\\WorseReflection\\\\Core\\\\NodeText\\:\\:\\$nodeText has no typehint specified\\.$#" - count: 1 - path: lib/Core/NodeText.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Offset\\:\\:fromUnknown\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Offset.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Offset\\:\\:fromUnknown\\(\\) has parameter \\$value with no typehint specified\\.$#" - count: 1 - path: lib/Core/Offset.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Offset\\:\\:toInt\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Offset.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Position\\:\\:fromFullStartStartAndEnd\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Position.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Position\\:\\:fromStartAndEnd\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Position.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionClassCollection\\:\\:concrete\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Reflection/Collection/ReflectionClassCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionMemberCollection\\:\\:byVisibilities\\(\\) has parameter \\$visibilities with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Reflection/Collection/ReflectionMemberCollection.php - - - - message: "#^Interface Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionMethodCollection has @implements tag, but can not implement any interface, must extend from it\\.$#" - count: 1 - path: lib/Core/Reflection/Collection/ReflectionMethodCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionMethodCollection\\:\\:abstract\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Reflection/Collection/ReflectionMethodCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionArgument\\:\\:value\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Reflection/ReflectionArgument.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionClass\\:\\:ancestors\\(\\) return type has no value type specified in iterable type Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionClassCollection\\.$#" - count: 1 - path: lib/Core/Reflection/ReflectionClass.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionClass\\:\\:isFinal\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Reflection/ReflectionClass.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionClass\\:\\:traits\\(\\) return type has no value type specified in iterable type Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionTraitCollection\\.$#" - count: 1 - path: lib/Core/Reflection/ReflectionClass.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionClassLike\\:\\:isConcrete\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Reflection/ReflectionClassLike.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionInterface\\:\\:parents\\(\\) return type has no value type specified in iterable type Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionInterfaceCollection\\.$#" - count: 1 - path: lib/Core/Reflection/ReflectionInterface.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionMember\\:\\:memberType\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Reflection/ReflectionMember.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionOffset\\:\\:fromFrameAndSymbolContext\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Reflection/ReflectionOffset.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionOffset\\:\\:fromFrameAndSymbolContext\\(\\) has parameter \\$frame with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflection/ReflectionOffset.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionOffset\\:\\:fromFrameAndSymbolContext\\(\\) has parameter \\$symbolInformation with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflection/ReflectionOffset.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionScope\\:\\:nameImports\\(\\) return type has no value type specified in iterable type Phpactor\\\\WorseReflection\\\\Core\\\\NameImports\\.$#" - count: 1 - path: lib/Core/Reflection/ReflectionScope.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionScope\\:\\:resolveFullyQualifiedName\\(\\) has parameter \\$type with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflection/ReflectionScope.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionSourceCode\\:\\:findClass\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Reflection/ReflectionSourceCode.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\TypeResolver\\\\FunctionReturnTypeResolver\\:\\:resolveTypes\\(\\) has parameter \\$types with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Reflection/TypeResolver/FunctionReturnTypeResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\TypeResolver\\\\MethodTypeResolver\\:\\:resolveTypes\\(\\) has parameter \\$types with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Reflection/TypeResolver/MethodTypeResolver.php - - - - message: "#^Variable \\$reflectioClass in PHPDoc tag @var does not match assigned variable \\$reflectionClass\\.$#" - count: 1 - path: lib/Core/Reflection/TypeResolver/MethodTypeResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\TypeResolver\\\\PropertyTypeResolver\\:\\:getDocblockTypesFromClass\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Reflection/TypeResolver/PropertyTypeResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\ClassReflector\\:\\:reflectClass\\(\\) has parameter \\$className with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/ClassReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\ClassReflector\\:\\:reflectClassLike\\(\\) has parameter \\$className with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/ClassReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\ClassReflector\\:\\:reflectInterface\\(\\) has parameter \\$className with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/ClassReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\ClassReflector\\:\\:reflectTrait\\(\\) has parameter \\$className with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/ClassReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\ClassReflector\\\\MemonizedReflector\\:\\:reflectClass\\(\\) has parameter \\$className with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/ClassReflector/MemonizedReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\ClassReflector\\\\MemonizedReflector\\:\\:reflectClassLike\\(\\) has parameter \\$className with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/ClassReflector/MemonizedReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\ClassReflector\\\\MemonizedReflector\\:\\:reflectFunction\\(\\) has parameter \\$name with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/ClassReflector/MemonizedReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\ClassReflector\\\\MemonizedReflector\\:\\:reflectInterface\\(\\) has parameter \\$className with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/ClassReflector/MemonizedReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\ClassReflector\\\\MemonizedReflector\\:\\:reflectTrait\\(\\) has parameter \\$className with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/ClassReflector/MemonizedReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CompositeReflector\\:\\:reflectClass\\(\\) has parameter \\$className with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CompositeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CompositeReflector\\:\\:reflectClassLike\\(\\) has parameter \\$className with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CompositeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CompositeReflector\\:\\:reflectClassesIn\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CompositeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CompositeReflector\\:\\:reflectFunction\\(\\) has parameter \\$name with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CompositeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CompositeReflector\\:\\:reflectFunctionsIn\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CompositeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CompositeReflector\\:\\:reflectInterface\\(\\) has parameter \\$className with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CompositeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CompositeReflector\\:\\:reflectMethodCall\\(\\) has parameter \\$offset with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CompositeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CompositeReflector\\:\\:reflectMethodCall\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CompositeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CompositeReflector\\:\\:reflectOffset\\(\\) has parameter \\$offset with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CompositeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CompositeReflector\\:\\:reflectOffset\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CompositeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CompositeReflector\\:\\:reflectTrait\\(\\) has parameter \\$className with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CompositeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CoreReflector\\:\\:reflectClass\\(\\) has parameter \\$className with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CoreReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CoreReflector\\:\\:reflectClassLike\\(\\) has parameter \\$className with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CoreReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CoreReflector\\:\\:reflectClassesIn\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CoreReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CoreReflector\\:\\:reflectFunction\\(\\) has parameter \\$name with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CoreReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CoreReflector\\:\\:reflectFunctionsIn\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CoreReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CoreReflector\\:\\:reflectMethodCall\\(\\) has parameter \\$offset with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CoreReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\CoreReflector\\:\\:reflectMethodCall\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/CoreReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\FunctionReflector\\:\\:reflectFunction\\(\\) has parameter \\$name with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/FunctionReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\SourceCode\\\\ContextualSourceCodeReflector\\:\\:reflectClassesIn\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/SourceCode/ContextualSourceCodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\SourceCode\\\\ContextualSourceCodeReflector\\:\\:reflectFunctionsIn\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/SourceCode/ContextualSourceCodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\SourceCode\\\\ContextualSourceCodeReflector\\:\\:reflectMethodCall\\(\\) has parameter \\$offset with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/SourceCode/ContextualSourceCodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\SourceCode\\\\ContextualSourceCodeReflector\\:\\:reflectMethodCall\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/SourceCode/ContextualSourceCodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\SourceCode\\\\ContextualSourceCodeReflector\\:\\:reflectOffset\\(\\) has parameter \\$offset with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/SourceCode/ContextualSourceCodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\SourceCode\\\\ContextualSourceCodeReflector\\:\\:reflectOffset\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/SourceCode/ContextualSourceCodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\SourceCodeReflector\\:\\:reflectClassesIn\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/SourceCodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\SourceCodeReflector\\:\\:reflectFunctionsIn\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/SourceCodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\SourceCodeReflector\\:\\:reflectMethodCall\\(\\) has parameter \\$offset with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/SourceCodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\SourceCodeReflector\\:\\:reflectMethodCall\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/SourceCodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\SourceCodeReflector\\:\\:reflectOffset\\(\\) has parameter \\$offset with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/SourceCodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflector\\\\SourceCodeReflector\\:\\:reflectOffset\\(\\) has parameter \\$sourceCode with no typehint specified\\.$#" - count: 1 - path: lib/Core/Reflector/SourceCodeReflector.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCode\\:\\:empty\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/SourceCode.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCode\\:\\:fromPath\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/SourceCode.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCode\\:\\:fromPathAndString\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/SourceCode.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCode\\:\\:fromString\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/SourceCode.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCode\\:\\:fromString\\(\\) has parameter \\$source with no typehint specified\\.$#" - count: 1 - path: lib/Core/SourceCode.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCode\\:\\:fromUnknown\\(\\) has parameter \\$value with no typehint specified\\.$#" - count: 1 - path: lib/Core/SourceCode.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCode\\:\\:path\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/SourceCode.php - - - - message: "#^Parameter \\#1 \\$source of class Phpactor\\\\WorseReflection\\\\Core\\\\SourceCode constructor expects string, string\\|false given\\.$#" - count: 1 - path: lib/Core/SourceCode.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCodeLocator\\\\ChainSourceLocator\\:\\:__construct\\(\\) has parameter \\$sourceLocators with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/SourceCodeLocator/ChainSourceLocator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCodeLocator\\\\NativeReflectionFunctionSourceLocator\\:\\:sourceFromFunctionName\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/SourceCodeLocator/NativeReflectionFunctionSourceLocator.php - - - - message: "#^Parameter \\#1 \\$filePath of static method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCode\\:\\:fromPathAndString\\(\\) expects string, string\\|false given\\.$#" - count: 1 - path: lib/Core/SourceCodeLocator/NativeReflectionFunctionSourceLocator.php - - - - message: "#^Parameter \\#1 \\$filename of function file_get_contents expects string, string\\|false given\\.$#" - count: 1 - path: lib/Core/SourceCodeLocator/NativeReflectionFunctionSourceLocator.php - - - - message: "#^Parameter \\#2 \\$source of static method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCode\\:\\:fromPathAndString\\(\\) expects string, string\\|false given\\.$#" - count: 1 - path: lib/Core/SourceCodeLocator/NativeReflectionFunctionSourceLocator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCodeLocator\\\\StubSourceLocator\\:\\:buildClassMap\\(\\) has parameter \\$file with no typehint specified\\.$#" - count: 1 - path: lib/Core/SourceCodeLocator/StubSourceLocator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCodeLocator\\\\StubSourceLocator\\:\\:buildClassMap\\(\\) has parameter \\$map with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/SourceCodeLocator/StubSourceLocator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCodeLocator\\\\StubSourceLocator\\:\\:buildClassMap\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/SourceCodeLocator/StubSourceLocator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCodeLocator\\\\StubSourceLocator\\:\\:buildFunctionMap\\(\\) has parameter \\$file with no typehint specified\\.$#" - count: 1 - path: lib/Core/SourceCodeLocator/StubSourceLocator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCodeLocator\\\\StubSourceLocator\\:\\:buildFunctionMap\\(\\) has parameter \\$map with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/SourceCodeLocator/StubSourceLocator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCodeLocator\\\\StubSourceLocator\\:\\:buildFunctionMap\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/SourceCodeLocator/StubSourceLocator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCodeLocator\\\\StubSourceLocator\\:\\:fileIterator\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/SourceCodeLocator/StubSourceLocator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCodeLocator\\\\StubSourceLocator\\:\\:map\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/SourceCodeLocator/StubSourceLocator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\SourceCodeLocator\\\\StubSourceLocator\\:\\:serializedMapPath\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/SourceCodeLocator/StubSourceLocator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Types\\:\\:__construct\\(\\) has parameter \\$inferredTypes with no typehint specified\\.$#" - count: 1 - path: lib/Core/Types.php - - - - message: "#^Property Phpactor\\\\WorseReflection\\\\Core\\\\Types\\:\\:\\$types has no typehint specified\\.$#" - count: 1 - path: lib/Core/Types.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Util\\\\OriginalMethodResolver\\:\\:resolveInterface\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Util/OriginalMethodResolver.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\AbstractReflectionCollection\\:\\:__construct\\(\\) has parameter \\$items with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\AbstractReflectionCollection\\:\\:first\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\AbstractReflectionCollection\\:\\:get\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\AbstractReflectionCollection\\:\\:keys\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\AbstractReflectionCollection\\:\\:last\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\AbstractReflectionCollection\\:\\:merge\\(\\) should return Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionCollection but returns static\\(Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\AbstractReflectionCollection\\)\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\AbstractReflectionCollection\\:\\:offsetExists\\(\\) has parameter \\$name with no typehint specified\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\AbstractReflectionCollection\\:\\:offsetGet\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\AbstractReflectionCollection\\:\\:offsetGet\\(\\) has parameter \\$name with no typehint specified\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\AbstractReflectionCollection\\:\\:offsetSet\\(\\) has parameter \\$name with no typehint specified\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\AbstractReflectionCollection\\:\\:offsetSet\\(\\) has parameter \\$value with no typehint specified\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\AbstractReflectionCollection\\:\\:offsetUnset\\(\\) has parameter \\$name with no typehint specified\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/AbstractReflectionCollection.php - - - - message: "#^Property Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\AbstractReflectionCollection\\:\\:\\$items type has no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/AbstractReflectionCollection.php - - - - message: "#^Unsafe usage of new static\\(\\)\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/AbstractReflectionCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\VirtualReflectionMemberCollection\\:\\:byVisibilities\\(\\) has parameter \\$visibilities with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/VirtualReflectionMemberCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\VirtualReflectionMemberCollection\\:\\:fromMembers\\(\\) has parameter \\$members with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/VirtualReflectionMemberCollection.php - - - - message: "#^Unsafe usage of new static\\(\\)\\.$#" - count: 9 - path: lib/Core/Virtual/Collection/VirtualReflectionMemberCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\VirtualReflectionMethodCollection\\:\\:fromReflectionMethods\\(\\) has parameter \\$reflectionMethods with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/VirtualReflectionMethodCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\VirtualReflectionParameterCollection\\:\\:empty\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/VirtualReflectionParameterCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\VirtualReflectionParameterCollection\\:\\:fromReflectionParameters\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/VirtualReflectionParameterCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\VirtualReflectionParameterCollection\\:\\:fromReflectionParameters\\(\\) has parameter \\$reflectionParameters with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/VirtualReflectionParameterCollection.php - - - - message: "#^Unsafe usage of new static\\(\\)\\.$#" - count: 2 - path: lib/Core/Virtual/Collection/VirtualReflectionParameterCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\VirtualReflectionPropertyCollection\\:\\:fromReflectionProperties\\(\\) has parameter \\$reflectionProperties with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Virtual/Collection/VirtualReflectionPropertyCollection.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\VirtualReflectionClassDecorator\\:\\:__construct\\(\\) has parameter \\$memberProviders with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Virtual/VirtualReflectionClassDecorator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\VirtualReflectionClassDecorator\\:\\:ancestors\\(\\) return type has no value type specified in iterable type Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionClassCollection\\.$#" - count: 1 - path: lib/Core/Virtual/VirtualReflectionClassDecorator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\VirtualReflectionClassDecorator\\:\\:methods\\(\\) should return Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionMethodCollection but returns Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionCollection\\\\.$#" - count: 1 - path: lib/Core/Virtual/VirtualReflectionClassDecorator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\VirtualReflectionClassDecorator\\:\\:properties\\(\\) should return Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionPropertyCollection but returns Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionCollection\\\\.$#" - count: 1 - path: lib/Core/Virtual/VirtualReflectionClassDecorator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\VirtualReflectionClassDecorator\\:\\:traits\\(\\) return type has no value type specified in iterable type Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionTraitCollection\\.$#" - count: 1 - path: lib/Core/Virtual/VirtualReflectionClassDecorator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\VirtualReflectionClassDecorator\\:\\:virtualMethods\\(\\) should return Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\VirtualReflectionMethodCollection but returns Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionCollection\\.$#" - count: 1 - path: lib/Core/Virtual/VirtualReflectionClassDecorator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\VirtualReflectionClassDecorator\\:\\:virtualProperties\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Virtual/VirtualReflectionClassDecorator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\VirtualReflectionClassLikeDecorator\\:\\:isConcrete\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Virtual/VirtualReflectionClassLikeDecorator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\VirtualReflectionInterfaceDecorator\\:\\:__construct\\(\\) has parameter \\$memberProviders with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/Core/Virtual/VirtualReflectionInterfaceDecorator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\VirtualReflectionInterfaceDecorator\\:\\:methods\\(\\) should return Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionMethodCollection but returns Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionCollection\\\\.$#" - count: 1 - path: lib/Core/Virtual/VirtualReflectionInterfaceDecorator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\VirtualReflectionInterfaceDecorator\\:\\:parents\\(\\) return type has no value type specified in iterable type Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionInterfaceCollection\\.$#" - count: 1 - path: lib/Core/Virtual/VirtualReflectionInterfaceDecorator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\VirtualReflectionInterfaceDecorator\\:\\:virtualMethods\\(\\) should return Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\Collection\\\\VirtualReflectionMethodCollection but returns Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionCollection\\\\.$#" - count: 1 - path: lib/Core/Virtual/VirtualReflectionInterfaceDecorator.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Virtual\\\\VirtualReflectionProperty\\:\\:memberType\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Virtual/VirtualReflectionProperty.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Visibility\\:\\:create\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Visibility.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Visibility\\:\\:create\\(\\) has parameter \\$visibility with no typehint specified\\.$#" - count: 1 - path: lib/Core/Visibility.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Visibility\\:\\:isPrivate\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Visibility.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Visibility\\:\\:isProtected\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Visibility.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Visibility\\:\\:isPublic\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Visibility.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Visibility\\:\\:private\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Visibility.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Visibility\\:\\:protected\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Visibility.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Visibility\\:\\:public\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Core/Visibility.php - - - - message: "#^Property Phpactor\\\\WorseReflection\\\\Core\\\\Visibility\\:\\:\\$visibility has no typehint specified\\.$#" - count: 1 - path: lib/Core/Visibility.php - - - - message: "#^Array \\(array\\\\) does not accept array\\\\.$#" - count: 1 - path: lib/ReflectorBuilder.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\ReflectorBuilder\\:\\:addSource\\(\\) has parameter \\$code with no typehint specified\\.$#" - count: 1 - path: lib/ReflectorBuilder.php - - - - message: "#^Method Phpactor\\\\WorseReflection\\\\ReflectorBuilder\\:\\:buildReflectorFactory\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/ReflectorBuilder.php - + path: src/ReflectorBuilder.php diff --git a/phpstan.neon b/phpstan.neon index 1343cada4..dc540d108 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -2,8 +2,8 @@ includes: - phpstan-baseline.neon parameters: level: 7 - inferPrivatePropertyTypeFromConstructor: true - reportUnmatchedIgnoredErrors: true - checkGenericClassInNonGenericObjectType: false + excludePaths: + - src/Core/SourceCodeLocator/InternalStubs/GenericTypes.php + paths: - - lib + - src diff --git a/src/Bridge/TolerantParser/Diagnostics/AssignmentToMissingPropertyDiagnostic.php b/src/Bridge/TolerantParser/Diagnostics/AssignmentToMissingPropertyDiagnostic.php index d30d02287..d7cbb3a69 100644 --- a/src/Bridge/TolerantParser/Diagnostics/AssignmentToMissingPropertyDiagnostic.php +++ b/src/Bridge/TolerantParser/Diagnostics/AssignmentToMissingPropertyDiagnostic.php @@ -17,6 +17,7 @@ public function __construct( private bool $isSubscriptAssignment ) { } + public function range(): ByteOffsetRange { return $this->range; diff --git a/src/Bridge/TolerantParser/Diagnostics/DeprecatedUsageDiagnosticProvider.php b/src/Bridge/TolerantParser/Diagnostics/DeprecatedUsageDiagnosticProvider.php index 4773bd054..53aa1f579 100644 --- a/src/Bridge/TolerantParser/Diagnostics/DeprecatedUsageDiagnosticProvider.php +++ b/src/Bridge/TolerantParser/Diagnostics/DeprecatedUsageDiagnosticProvider.php @@ -245,6 +245,7 @@ private function memberAccessDiagnostics(MemberAccessContext $resolved): Generat $member->memberType(), ); } + /** * @return Generator */ @@ -262,6 +263,7 @@ private function classLikeDiagnostics(ClassLikeContext $resolved): Generator $reflectionClass->classLikeType(), ); } + /** * @return Generator */ diff --git a/src/Bridge/TolerantParser/Diagnostics/Docblock/ClassGenericDiagnosticHelper.php b/src/Bridge/TolerantParser/Diagnostics/Docblock/ClassGenericDiagnosticHelper.php index 628fe982e..bd264351c 100644 --- a/src/Bridge/TolerantParser/Diagnostics/Docblock/ClassGenericDiagnosticHelper.php +++ b/src/Bridge/TolerantParser/Diagnostics/Docblock/ClassGenericDiagnosticHelper.php @@ -32,6 +32,7 @@ public function diagnosticsForExtends( yield from $this->fromReflectionClass($reflector, $range, $class, $parentClass, $class->docblock()->extends(), '@extends'); } } + /** * @return Generator */ diff --git a/src/Bridge/TolerantParser/Diagnostics/DocblockMissingClassGenericDiagnostic.php b/src/Bridge/TolerantParser/Diagnostics/DocblockMissingClassGenericDiagnostic.php index 1fef5a924..23da24348 100644 --- a/src/Bridge/TolerantParser/Diagnostics/DocblockMissingClassGenericDiagnostic.php +++ b/src/Bridge/TolerantParser/Diagnostics/DocblockMissingClassGenericDiagnostic.php @@ -10,7 +10,6 @@ class DocblockMissingClassGenericDiagnostic implements Diagnostic { - public function __construct( private ByteOffsetRange $range, private ClassName $className, diff --git a/src/Bridge/TolerantParser/Diagnostics/MissingReturnTypeProvider.php b/src/Bridge/TolerantParser/Diagnostics/MissingReturnTypeProvider.php index 21c05f23f..23a47a6ee 100644 --- a/src/Bridge/TolerantParser/Diagnostics/MissingReturnTypeProvider.php +++ b/src/Bridge/TolerantParser/Diagnostics/MissingReturnTypeProvider.php @@ -87,6 +87,7 @@ function foo() { } ); } + public function exit(NodeContextResolver $resolver, Frame $frame, Node $node): iterable { if (!$node instanceof MethodDeclaration) { diff --git a/src/Bridge/TolerantParser/Diagnostics/UndefinedVariableDiagnostic.php b/src/Bridge/TolerantParser/Diagnostics/UndefinedVariableDiagnostic.php index c0af5ff88..d76d2ff56 100644 --- a/src/Bridge/TolerantParser/Diagnostics/UndefinedVariableDiagnostic.php +++ b/src/Bridge/TolerantParser/Diagnostics/UndefinedVariableDiagnostic.php @@ -47,6 +47,7 @@ public function message(): string $suggestString ); } + /** * @return list */ @@ -59,5 +60,4 @@ public function undefinedVariableName(): string { return $this->varName; } - } diff --git a/src/Bridge/TolerantParser/Diagnostics/UnresolvableNameDiagnostic.php b/src/Bridge/TolerantParser/Diagnostics/UnresolvableNameDiagnostic.php index 48eadd4a1..ee92524ac 100644 --- a/src/Bridge/TolerantParser/Diagnostics/UnresolvableNameDiagnostic.php +++ b/src/Bridge/TolerantParser/Diagnostics/UnresolvableNameDiagnostic.php @@ -10,6 +10,7 @@ class UnresolvableNameDiagnostic implements Diagnostic { public const TYPE_CLASS = 'class'; + public const TYPE_FUNCTION = 'function'; /** diff --git a/src/Bridge/TolerantParser/Reflection/AbstractReflectionClass.php b/src/Bridge/TolerantParser/Reflection/AbstractReflectionClass.php index a4ec4b554..63fe3ea57 100644 --- a/src/Bridge/TolerantParser/Reflection/AbstractReflectionClass.php +++ b/src/Bridge/TolerantParser/Reflection/AbstractReflectionClass.php @@ -20,6 +20,7 @@ abstract class AbstractReflectionClass extends AbstractReflectedNode implements ReflectionClassLike { abstract public function name(): ClassName; + abstract public function docblock(): DocBlock; public function isInterface(): bool diff --git a/src/Bridge/TolerantParser/Reflection/AbstractReflectionMethodCall.php b/src/Bridge/TolerantParser/Reflection/AbstractReflectionMethodCall.php index 659c1b900..71b061e0e 100644 --- a/src/Bridge/TolerantParser/Reflection/AbstractReflectionMethodCall.php +++ b/src/Bridge/TolerantParser/Reflection/AbstractReflectionMethodCall.php @@ -89,7 +89,6 @@ public function name(): string return NodeUtil::nameFromTokenOrNode($this->node, $this->node->memberName); } - public function method(): ReflectionMethod { $class = $this->class(); @@ -114,6 +113,7 @@ public function scope(): ReflectionScope { return new ReflectionScope($this->services->reflector(), $this->node); } + public function nameRange(): ByteOffsetRange { $memberName = $this->node->memberName; diff --git a/src/Bridge/TolerantParser/Reflection/ClassInvocation.php b/src/Bridge/TolerantParser/Reflection/ClassInvocation.php index e6eb0272d..2a7e4a02b 100644 --- a/src/Bridge/TolerantParser/Reflection/ClassInvocation.php +++ b/src/Bridge/TolerantParser/Reflection/ClassInvocation.php @@ -8,5 +8,6 @@ interface ClassInvocation { public function class(): ReflectionClassLike; + public function arguments(): ReflectionArgumentCollection; } diff --git a/src/Bridge/TolerantParser/Reflection/ReflectionEnumCase.php b/src/Bridge/TolerantParser/Reflection/ReflectionEnumCase.php index ad516725b..56fe4ffaf 100644 --- a/src/Bridge/TolerantParser/Reflection/ReflectionEnumCase.php +++ b/src/Bridge/TolerantParser/Reflection/ReflectionEnumCase.php @@ -76,7 +76,6 @@ public function isVirtual(): bool return false; } - public function value(): Type { if ($this->node->assignment === null) { diff --git a/src/Bridge/TolerantParser/Reflection/ReflectionMatchExpression.php b/src/Bridge/TolerantParser/Reflection/ReflectionMatchExpression.php index b17f8a612..a53b937d8 100644 --- a/src/Bridge/TolerantParser/Reflection/ReflectionMatchExpression.php +++ b/src/Bridge/TolerantParser/Reflection/ReflectionMatchExpression.php @@ -39,6 +39,7 @@ public function expressionType(): Type $expr = $this->services->nodeContextResolver()->resolveNode($this->frame, $this->node->expression); return $expr->type(); } + public function scope(): ReflectionScope { return new ReflectionScope($this->services->reflector(), $this->node); diff --git a/src/Bridge/TolerantParser/Reflection/ReflectionTrait.php b/src/Bridge/TolerantParser/Reflection/ReflectionTrait.php index fde30023d..76294db17 100644 --- a/src/Bridge/TolerantParser/Reflection/ReflectionTrait.php +++ b/src/Bridge/TolerantParser/Reflection/ReflectionTrait.php @@ -119,6 +119,7 @@ public function classLikeType(): string { return 'trait'; } + /** * @return TraitDeclaration */ diff --git a/src/Bridge/TolerantParser/Reflector/TolerantSourceCodeReflector.php b/src/Bridge/TolerantParser/Reflector/TolerantSourceCodeReflector.php index 35a956d3f..2aef63484 100644 --- a/src/Bridge/TolerantParser/Reflector/TolerantSourceCodeReflector.php +++ b/src/Bridge/TolerantParser/Reflector/TolerantSourceCodeReflector.php @@ -133,7 +133,6 @@ public function reflectNodeContext(Node $node): NodeContext return $this->serviceLocator->nodeContextResolver()->resolveNode($frame, $node); } - public function reflectNode( TextDocument $sourceCode, ByteOffset|int $offset diff --git a/src/Core/ClassHierarchyResolver.php b/src/Core/ClassHierarchyResolver.php index 3c9704c58..527e3e4a1 100644 --- a/src/Core/ClassHierarchyResolver.php +++ b/src/Core/ClassHierarchyResolver.php @@ -11,8 +11,11 @@ final class ClassHierarchyResolver { public const INCLUDE_TRAIT = 0x00000001; + public const INCLUDE_INTERFACE = 0x00000010; + public const INCLUDE_PARENT = 0x00000100; + public const INCLUDE_MIXIN = 0x00001000; /** diff --git a/src/Core/DiagnosticExample.php b/src/Core/DiagnosticExample.php index 84f9d49fb..7350abf51 100644 --- a/src/Core/DiagnosticExample.php +++ b/src/Core/DiagnosticExample.php @@ -17,5 +17,4 @@ public function __construct( public ?string $minPhpVersion = null ) { } - } diff --git a/src/Core/DiagnosticProvider/InMemoryDiagnosticProvider.php b/src/Core/DiagnosticProvider/InMemoryDiagnosticProvider.php index 425a61d25..66a2cdf27 100644 --- a/src/Core/DiagnosticProvider/InMemoryDiagnosticProvider.php +++ b/src/Core/DiagnosticProvider/InMemoryDiagnosticProvider.php @@ -22,6 +22,7 @@ public function examples(): iterable { return []; } + public function exit(NodeContextResolver $resolver, Frame $frame, Node $node): iterable { if (!$node instanceof SourceFileNode) { diff --git a/src/Core/DiagnosticSeverity.php b/src/Core/DiagnosticSeverity.php index 3d2c4256f..a90b571e5 100644 --- a/src/Core/DiagnosticSeverity.php +++ b/src/Core/DiagnosticSeverity.php @@ -7,8 +7,11 @@ final class DiagnosticSeverity { public const ERROR = 1; + public const WARNING = 2; + public const INFORMATION = 3; + public const HINT = 4; /** diff --git a/src/Core/DocBlock/PlainDocblock.php b/src/Core/DocBlock/PlainDocblock.php index 2a08618e1..db6974e3c 100644 --- a/src/Core/DocBlock/PlainDocblock.php +++ b/src/Core/DocBlock/PlainDocblock.php @@ -16,10 +16,15 @@ class PlainDocblock implements DocBlock { private const LEADING = 3; + private const TEXT = 2; + private const EXTRA_ASTERIX = 1; + private const START = 0; + private const WHITESPACE = 4; + private const WS_OR_TERMINATE = 5; private string $raw; diff --git a/src/Core/Inference/Assignments.php b/src/Core/Inference/Assignments.php index 2f15383aa..d38a3bf44 100644 --- a/src/Core/Inference/Assignments.php +++ b/src/Core/Inference/Assignments.php @@ -32,7 +32,6 @@ final protected function __construct(array $variables) $this->variables = $variables; } - public function __toString(): string { return implode("\n", array_map(function (Variable $variable) { diff --git a/src/Core/Inference/FunctionStubRegistry.php b/src/Core/Inference/FunctionStubRegistry.php index 33e56758f..cd5e0c009 100644 --- a/src/Core/Inference/FunctionStubRegistry.php +++ b/src/Core/Inference/FunctionStubRegistry.php @@ -11,7 +11,6 @@ public function __construct(private array $functionMap) { } - public function get(string $name): ?FunctionStub { if (!isset($this->functionMap[$name])) { diff --git a/src/Core/Inference/MemberTypeResolver.php b/src/Core/Inference/MemberTypeResolver.php index e99b59c4a..acaed36be 100644 --- a/src/Core/Inference/MemberTypeResolver.php +++ b/src/Core/Inference/MemberTypeResolver.php @@ -14,7 +14,9 @@ class MemberTypeResolver { const TYPE_METHODS = 'methods'; + const TYPE_CONSTANTS = 'constants'; + const TYPE_PROPERTIES = 'properties'; public function __construct(private ClassReflector $reflector) diff --git a/src/Core/Inference/Resolver/MemberAccess/NodeContextFromMemberAccess.php b/src/Core/Inference/Resolver/MemberAccess/NodeContextFromMemberAccess.php index d1480f014..89644e970 100644 --- a/src/Core/Inference/Resolver/MemberAccess/NodeContextFromMemberAccess.php +++ b/src/Core/Inference/Resolver/MemberAccess/NodeContextFromMemberAccess.php @@ -148,7 +148,6 @@ private function resolveContainerMemberType( foreach ($classType->expandTypes()->classLike() as $subType) { // upcast to ClassType to reflected type if (get_class($subType) === ClassType::class) { - /** @phpstan-ignore-next-line */ $subType = $subType->asReflectedClasssType($resolver->reflector()); } diff --git a/src/Core/Inference/Symbol.php b/src/Core/Inference/Symbol.php index 476f18528..7385824a8 100644 --- a/src/Core/Inference/Symbol.php +++ b/src/Core/Inference/Symbol.php @@ -8,17 +8,29 @@ final class Symbol { public const CLASS_ = 'class'; + public const VARIABLE = 'variable'; + public const METHOD = 'method'; + public const FUNCTION = 'function'; + public const PROPERTY = 'property'; + public const CONSTANT = 'constant'; + public const DECLARED_CONSTANT = 'declared_constant'; + public const CASE = 'case'; + public const STRING = 'string'; + public const NUMBER = 'number'; + public const BOOLEAN = 'boolean'; + public const ARRAY = 'array'; + public const UNKNOWN = ''; private string $name; diff --git a/src/Core/Inference/TypeAssertion.php b/src/Core/Inference/TypeAssertion.php index 7cfcdd065..4acf35391 100644 --- a/src/Core/Inference/TypeAssertion.php +++ b/src/Core/Inference/TypeAssertion.php @@ -10,6 +10,7 @@ final class TypeAssertion { const VARIABLE_TYPE_PROPERTY = 'property'; + const VARIABLE_TYPE_VARIABLE = 'variable'; private string $name; diff --git a/src/Core/Inference/TypeCombinator.php b/src/Core/Inference/TypeCombinator.php index 907b059ed..10ba8a416 100644 --- a/src/Core/Inference/TypeCombinator.php +++ b/src/Core/Inference/TypeCombinator.php @@ -46,7 +46,6 @@ public static function narrowTo(Type $type, Type $narrowTo): Type return $t; } - public static function subtract(Type $type, Type $from): Type { $from = TypeFactory::toAggregateOrUnion($from); diff --git a/src/Core/Inference/Walker/IncludeWalker.php b/src/Core/Inference/Walker/IncludeWalker.php index f9b3f1f9d..7999f7eee 100644 --- a/src/Core/Inference/Walker/IncludeWalker.php +++ b/src/Core/Inference/Walker/IncludeWalker.php @@ -26,7 +26,6 @@ public function __construct(private LoggerInterface $logger, private FrameResolv $this->parser = $parser ?: new Parser(); } - public function nodeFqns(): array { return [ScriptInclusionExpression::class]; diff --git a/src/Core/Inference/Walker/TestAssertWalker.php b/src/Core/Inference/Walker/TestAssertWalker.php index ddca59c18..58b840be9 100644 --- a/src/Core/Inference/Walker/TestAssertWalker.php +++ b/src/Core/Inference/Walker/TestAssertWalker.php @@ -7,7 +7,6 @@ use Microsoft\PhpParser\Node\Expression\ArgumentExpression; use Microsoft\PhpParser\Node\Expression\CallExpression; use PHPUnit\Framework\TestCase; -use Phpactor\TextDocument\ByteOffset; use Phpactor\WorseReflection\Bridge\TolerantParser\TextDocument\NodeToTextDocumentConverter; use Phpactor\WorseReflection\Core\Inference\Frame; use Phpactor\WorseReflection\Core\Inference\FrameResolver; @@ -38,7 +37,6 @@ public function enter(FrameResolver $resolver, Frame $frame, Node $node): Frame $name = $node->callableExpression->getText(); if ($name === 'wrFrame') { - /** @phpstan-ignore-next-line Allow dump() here */ dump($frame->__toString()); return $frame; } diff --git a/src/Core/Inference/Walker/VariableWalker.php b/src/Core/Inference/Walker/VariableWalker.php index 137e1179a..8dd1ed3fc 100644 --- a/src/Core/Inference/Walker/VariableWalker.php +++ b/src/Core/Inference/Walker/VariableWalker.php @@ -21,7 +21,6 @@ public function __construct(private DocBlockFactory $docblockFactory) { } - public function nodeFqns(): array { return []; diff --git a/src/Core/Reflection/Collection/ChainReflectionMemberCollection.php b/src/Core/Reflection/Collection/ChainReflectionMemberCollection.php index 70c0cf1e6..29bd5f67c 100644 --- a/src/Core/Reflection/Collection/ChainReflectionMemberCollection.php +++ b/src/Core/Reflection/Collection/ChainReflectionMemberCollection.php @@ -51,7 +51,6 @@ public function getIterator(): Traversable { $iterator = new AppendIterator(); foreach ($this->collections as $collection) { - /** @phpstan-ignore-next-line */ $iterator->append($collection->getIterator()); } @@ -76,7 +75,6 @@ public function keys(): array /** * @param ReflectionMemberCollection $collection - * @phpstan-ignore-next-line */ public function merge(ReflectionCollection $collection): self { diff --git a/src/Core/Reflection/Collection/ClassLikeReflectionMemberCollection.php b/src/Core/Reflection/Collection/ClassLikeReflectionMemberCollection.php index aca59b327..cbd64dad5 100644 --- a/src/Core/Reflection/Collection/ClassLikeReflectionMemberCollection.php +++ b/src/Core/Reflection/Collection/ClassLikeReflectionMemberCollection.php @@ -222,7 +222,6 @@ public function enumCases(): ReflectionEnumCaseCollection return new ReflectionEnumCaseCollection($this->enumCases); } - public function map(Closure $closure) { $new = new self([]); diff --git a/src/Core/Reflection/Collection/ReflectionMemberCollection.php b/src/Core/Reflection/Collection/ReflectionMemberCollection.php index 481c66791..f742d9e8e 100644 --- a/src/Core/Reflection/Collection/ReflectionMemberCollection.php +++ b/src/Core/Reflection/Collection/ReflectionMemberCollection.php @@ -57,7 +57,6 @@ public function enumCases(): ReflectionEnumCaseCollection; */ public function byMemberType(string $type): ReflectionCollection; - /** * @param Closure(T): ReflectionMember $mapper * @return static diff --git a/src/Core/Reflection/ReflectionClassLike.php b/src/Core/Reflection/ReflectionClassLike.php index 3ac370a1c..1b0b31e79 100644 --- a/src/Core/Reflection/ReflectionClassLike.php +++ b/src/Core/Reflection/ReflectionClassLike.php @@ -39,7 +39,6 @@ public function isInterface(): bool; public function isInstanceOf(ClassName $className): bool; - /** * @deprecated Use instanceof instead */ diff --git a/src/Core/Reflection/ReflectionDeclaredConstant.php b/src/Core/Reflection/ReflectionDeclaredConstant.php index 4c6e04c15..0898f4e90 100644 --- a/src/Core/Reflection/ReflectionDeclaredConstant.php +++ b/src/Core/Reflection/ReflectionDeclaredConstant.php @@ -11,8 +11,12 @@ interface ReflectionDeclaredConstant { public function name(): Name; + public function type(): Type; + public function sourceCode(): TextDocument; + public function docblock(): DocBlock; + public function position(): ByteOffsetRange; } diff --git a/src/Core/Reflection/ReflectionMember.php b/src/Core/Reflection/ReflectionMember.php index 9977a94f8..9f708a24e 100644 --- a/src/Core/Reflection/ReflectionMember.php +++ b/src/Core/Reflection/ReflectionMember.php @@ -12,8 +12,11 @@ interface ReflectionMember { public const TYPE_METHOD = 'method'; + public const TYPE_PROPERTY = 'property'; + public const TYPE_CONSTANT = 'constant'; + public const TYPE_CASE = 'case'; public function position(): ByteOffsetRange; diff --git a/src/Core/Reflector/ClassReflector/MemonizedReflector.php b/src/Core/Reflector/ClassReflector/MemonizedReflector.php index edd43c9b8..9b58a5158 100644 --- a/src/Core/Reflector/ClassReflector/MemonizedReflector.php +++ b/src/Core/Reflector/ClassReflector/MemonizedReflector.php @@ -21,10 +21,15 @@ class MemonizedReflector implements ClassReflector, FunctionReflector, ConstantReflector { private const FUNC_PREFIX = '__func__'; + private const CLASS_PREFIX = '__class__'; + private const INTERFACE_PREFIX = '__interface__'; + private const TRAIT_PREFIX = '__trait__'; + private const ENUM_PREFIX = '__enum__'; + private const CLASS_LIKE_PREFIX = '__class_like__'; private ClassReflector $innerReflector; diff --git a/src/Core/SourceCodeLocator/InternalStubs/Enum.php b/src/Core/SourceCodeLocator/InternalStubs/Enum.php index 60b0cfa07..cbe13df05 100644 --- a/src/Core/SourceCodeLocator/InternalStubs/Enum.php +++ b/src/Core/SourceCodeLocator/InternalStubs/Enum.php @@ -1,12 +1,13 @@ */ -class Generator implements Traversable { +class Generator implements Traversable +{ /** * @return ?TValue Can return any type. */ - public function current() {} + public function current() + { + } /** * @return void Any returned value is ignored. */ - public function next() {} + public function next(): void + { + } /** * @return TKey scalar on success, or null on failure. */ - public function key() {} + public function key() + { + } /** * @return bool The return value will be casted to boolean and then evaluated. */ - public function valid() {} + public function valid() + { + } /** * @return void Any returned value is ignored. */ - public function rewind() {} + public function rewind(): void + { + } /** * @return TReturn Can return any type. */ - public function getReturn() {} + public function getReturn() + { + } /** * @param TSend $value * @return ?TValue Can return any type. */ - public function send($value) {} + public function send($value) + { + } /** * @return ?TValue Can return any type. */ - public function throw(Throwable $exception) {} + public function throw(Throwable $exception) + { + } } /** @@ -60,8 +77,8 @@ public function throw(Throwable $exception) {} * @template TKey * @template TValue */ -interface ArrayAccess { - +interface ArrayAccess +{ /** * Whether a offset exists * @link http://php.net/manual/en/arrayaccess.offsetexists.php @@ -91,22 +108,20 @@ public function offsetGet($offset); * * @param TKey|null $offset The offset to assign the value to. * @param TValue $value The value to set. - * @return void * * @since 5.0.0 */ - public function offsetSet($offset, $value); + public function offsetSet($offset, $value): void; /** * Offset to unset * @link http://php.net/manual/en/arrayaccess.offsetunset.php * * @param TKey $offset The offset to unset. - * @return void * * @since 5.0.0 */ - public function offsetUnset($offset); + public function offsetUnset($offset): void; } /** @@ -118,7 +133,8 @@ public function offsetUnset($offset); * @template-implements IteratorAggregate * @template-implements ArrayAccess */ -class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Countable { +class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Countable +{ /** * Properties of the object have their normal functionality when accessed as list (var_dump, foreach, etc.). */ @@ -139,7 +155,9 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count * * @since 5.0.0 */ - public function __construct($input = null, $flags = 0, $iterator_class = "ArrayIterator") { } + public function __construct($input = null, $flags = 0, $iterator_class = 'ArrayIterator') + { + } /** * Returns whether the requested index exists @@ -150,7 +168,9 @@ public function __construct($input = null, $flags = 0, $iterator_class = "ArrayI * * @since 5.0.0 */ - public function offsetExists($index) { } + public function offsetExists($index) + { + } /** * Returns the value at the specified index @@ -161,7 +181,9 @@ public function offsetExists($index) { } * * @since 5.0.0 */ - public function offsetGet($index) { } + public function offsetGet($index) + { + } /** * Sets the value at the specified index to newval @@ -169,33 +191,36 @@ public function offsetGet($index) { } * * @param TKey $index The index being set. * @param TValue $newval The new value for the index. - * @return void * * @since 5.0.0 */ - public function offsetSet($index, $newval) { } + public function offsetSet($index, $newval): void + { + } /** * Unsets the value at the specified index * @link http://php.net/manual/en/arrayobject.offsetunset.php * * @param TKey $index The index being unset. - * @return void * * @since 5.0.0 */ - public function offsetUnset($index) { } + public function offsetUnset($index): void + { + } /** * Appends the value * @link http://php.net/manual/en/arrayobject.append.php * * @param TValue $value The value being appended. - * @return void * * @since 5.0.0 */ - public function append($value) { } + public function append($value): void + { + } /** * Creates a copy of the ArrayObject. @@ -206,7 +231,9 @@ public function append($value) { } * * @since 5.0.0 */ - public function getArrayCopy() { } + public function getArrayCopy() + { + } /** * Get the number of public properties in the ArrayObject @@ -217,7 +244,9 @@ public function getArrayCopy() { } * * @since 5.0.0 */ - public function count() { } + public function count() + { + } /** * Gets the behavior flags. @@ -227,7 +256,9 @@ public function count() { } * * @since 5.1.0 */ - public function getFlags() { } + public function getFlags() + { + } /** * Sets the behavior flags. @@ -263,31 +294,34 @@ public function getFlags() { } * @link http://php.net/manual/en/arrayobject.setflags.php * * @param int $flags The new ArrayObject behavior. - * @return void * * @since 5.1.0 */ - public function setFlags($flags) { } + public function setFlags($flags): void + { + } /** * Sort the entries by value * @link http://php.net/manual/en/arrayobject.asort.php * - * @return void * * @since 5.2.0 */ - public function asort() { } + public function asort(): void + { + } /** * Sort the entries by key * @link http://php.net/manual/en/arrayobject.ksort.php * - * @return void * * @since 5.2.0 */ - public function ksort() { } + public function ksort(): void + { + } /** * Sort the entries with a user-defined comparison function and maintain key association @@ -301,11 +335,12 @@ public function ksort() { } * second. * * @param callable(TValue, TValue):int $cmp_function - * @return void * * @since 5.2.0 */ - public function uasort($cmp_function) { } + public function uasort($cmp_function): void + { + } /** * Sort the entries by keys using a user-defined comparison function @@ -319,31 +354,34 @@ public function uasort($cmp_function) { } * second. * * @param callable(TKey, TKey):int $cmp_function The callable comparison function. - * @return void * * @since 5.2.0 */ - public function uksort($cmp_function) { } + public function uksort($cmp_function): void + { + } /** * Sort entries using a "natural order" algorithm * @link http://php.net/manual/en/arrayobject.natsort.php * - * @return void * * @since 5.2.0 */ - public function natsort() { } + public function natsort(): void + { + } /** * Sort an array using a case insensitive "natural order" algorithm * @link http://php.net/manual/en/arrayobject.natcasesort.php * - * @return void * * @since 5.2.0 */ - public function natcasesort() { } + public function natcasesort(): void + { + } /** * Unserialize an ArrayObject @@ -354,7 +392,9 @@ public function natcasesort() { } * * @since 5.3.0 */ - public function unserialize($serialized) { } + public function unserialize($serialized): void + { + } /** * Serialize an ArrayObject @@ -364,7 +404,9 @@ public function unserialize($serialized) { } * * @since 5.3.0 */ - public function serialize() { } + public function serialize() + { + } /** * Create a new iterator from an ArrayObject instance @@ -374,7 +416,9 @@ public function serialize() { } * * @since 5.0.0 */ - public function getIterator() { } + public function getIterator() + { + } /** * Exchange the array for another one. @@ -385,18 +429,21 @@ public function getIterator() { } * * @since 5.1.0 */ - public function exchangeArray($input) { } + public function exchangeArray($input) + { + } /** * Sets the iterator classname for the ArrayObject. * @link http://php.net/manual/en/arrayobject.setiteratorclass.php * * @param string $iterator_class The classname of the array iterator to use when iterating over this object. - * @return void * * @since 5.1.0 */ - public function setIteratorClass($iterator_class) { } + public function setIteratorClass($iterator_class): void + { + } /** * Gets the iterator classname for the ArrayObject. @@ -406,10 +453,13 @@ public function setIteratorClass($iterator_class) { } * * @since 5.1.0 */ - public function getIteratorClass() { } + public function getIteratorClass() + { + } } -interface Serializable { +interface Serializable +{ /** * @return null|string */ @@ -417,9 +467,8 @@ public function serialize(); /** * @param string $data - * @return void */ - public function unserialize($data); + public function unserialize($data): void; } /** @@ -428,17 +477,23 @@ public function unserialize($data); final class WeakReference { // always fail - public function __construct() {} + public function __construct() + { + } /** * @template TIn as object * @param TIn $referent * @return WeakReference */ - public static function create(object $referent): WeakReference {} + public static function create(object $referent): WeakReference + { + } /** @return ?T */ - public function get(): ?object {} + public function get(): ?object + { + } } /** @@ -456,44 +511,55 @@ final class WeakMap implements ArrayAccess, Countable, IteratorAggregate, Traver * @param TKey $offset * @return bool */ - public function offsetExists($offset) {} + public function offsetExists($offset) + { + } /** * @param TKey $offset * @return TVal|null */ - public function offsetGet($offset) {} + public function offsetGet($offset) + { + } /** * @param TKey $offset * @param TVal $value - * @return void */ - public function offsetSet($offset, $value) {} + public function offsetSet($offset, $value): void + { + } /** * @param TKey $offset - * @return void */ - public function offsetUnset($offset) {} + public function offsetUnset($offset): void + { + } } #[Attribute(Attribute::TARGET_METHOD)] final class ReturnTypeWillChange { - public function __construct() {} + public function __construct() + { + } } #[Attribute(Attribute::TARGET_PARAMETER)] final class SensitiveParameter { - public function __construct() {} + public function __construct() + { + } } #[Attribute(Attribute::TARGET_CLASS)] final class AllowDynamicProperties { - public function __construct() {} + public function __construct() + { + } } - diff --git a/src/Core/Type.php b/src/Core/Type.php index 3eb2c5b49..8f13e98fc 100644 --- a/src/Core/Type.php +++ b/src/Core/Type.php @@ -68,7 +68,6 @@ public function allTypes(): Types return new Types([$this]); } - public function isDefined(): bool { return !$this instanceof MissingType; @@ -218,6 +217,7 @@ public function isMixed(): bool { return $this instanceof MixedType; } + public function mergeType(Type $type): Type { if ($this instanceof MissingType) { diff --git a/src/Core/Type/AggregateType.php b/src/Core/Type/AggregateType.php index bbcb422f6..aa30c17e6 100644 --- a/src/Core/Type/AggregateType.php +++ b/src/Core/Type/AggregateType.php @@ -178,6 +178,7 @@ public function filter(Closure $closure): AggregateType { return $this->withTypes(...array_filter($this->types, $closure)); } + public function count(): int { return count($this->types); diff --git a/src/Core/Type/BitwiseOperable.php b/src/Core/Type/BitwiseOperable.php index c8c0572a5..498934f7a 100644 --- a/src/Core/Type/BitwiseOperable.php +++ b/src/Core/Type/BitwiseOperable.php @@ -7,9 +7,14 @@ interface BitwiseOperable { public function shiftRight(Type $right): Type; + public function shiftLeft(Type $right): Type; + public function bitwiseXor(Type $right): Type; + public function bitwiseOr(Type $right): Type; + public function bitwiseAnd(Type $right): Type; + public function bitwiseNot(): Type; } diff --git a/src/Core/Type/ClassType.php b/src/Core/Type/ClassType.php index b29f1c5e1..747d038f1 100644 --- a/src/Core/Type/ClassType.php +++ b/src/Core/Type/ClassType.php @@ -55,7 +55,6 @@ public function mergeMembers(ReflectionMemberCollection $collection): self return $new; } - public function is(Type $type): Trinary { if ($type instanceof MissingType) { diff --git a/src/Core/Type/IntLiteralType.php b/src/Core/Type/IntLiteralType.php index 939f97ed3..989d6dfa8 100644 --- a/src/Core/Type/IntLiteralType.php +++ b/src/Core/Type/IntLiteralType.php @@ -18,7 +18,6 @@ public function __toString(): string return (string)$this->value; } - public function value(): int { return $this->value; diff --git a/src/Core/Type/IntNegative.php b/src/Core/Type/IntNegative.php index d2c9c9926..16e45d53d 100644 --- a/src/Core/Type/IntNegative.php +++ b/src/Core/Type/IntNegative.php @@ -8,6 +8,7 @@ public function __toString(): string { return 'negative-int'; } + public function toPhpString(): string { return 'int'; diff --git a/src/Core/Type/IntPositive.php b/src/Core/Type/IntPositive.php index b5a59c9ba..d4d213e62 100644 --- a/src/Core/Type/IntPositive.php +++ b/src/Core/Type/IntPositive.php @@ -8,6 +8,7 @@ public function __toString(): string { return 'positive-int'; } + public function toPhpString(): string { return 'int'; diff --git a/src/Core/Type/IntersectionType.php b/src/Core/Type/IntersectionType.php index 75cf30bb2..f4e75be90 100644 --- a/src/Core/Type/IntersectionType.php +++ b/src/Core/Type/IntersectionType.php @@ -12,6 +12,7 @@ public function __toString(): string { return implode('&', array_map(fn (Type $type) => $type->__toString(), $this->types)); } + public static function toIntersection(Type $type): AggregateType { if ($type instanceof NullableType) { diff --git a/src/Core/Type/IterableType.php b/src/Core/Type/IterableType.php index 4e1a6be41..2434c75a8 100644 --- a/src/Core/Type/IterableType.php +++ b/src/Core/Type/IterableType.php @@ -7,5 +7,6 @@ interface IterableType { public function iterableValueType(): Type; + public function iterableKeyType(): Type; } diff --git a/src/Core/Type/Resolver/IterableTypeResolver.php b/src/Core/Type/Resolver/IterableTypeResolver.php index 5aa942917..1d57dadd5 100644 --- a/src/Core/Type/Resolver/IterableTypeResolver.php +++ b/src/Core/Type/Resolver/IterableTypeResolver.php @@ -26,6 +26,7 @@ public static function iterableClasses(): array 'iterable', ]; } + /** * @param Type[] $arguments */ diff --git a/src/Core/TypeFactory.php b/src/Core/TypeFactory.php index 653a74f04..6c95041df 100644 --- a/src/Core/TypeFactory.php +++ b/src/Core/TypeFactory.php @@ -466,7 +466,6 @@ private static function typeFromString(string $type, Reflector $reflector = null return self::class(ClassName::fromString($type), $reflector); } - private static function convertNumericStringToInternalType(string $value): NumericType { if (1 === preg_match('/^[1-9][0-9]*$/', $value)) { diff --git a/src/Core/Util/NodeUtil.php b/src/Core/Util/NodeUtil.php index 9ffcc4172..6455262b9 100644 --- a/src/Core/Util/NodeUtil.php +++ b/src/Core/Util/NodeUtil.php @@ -284,6 +284,7 @@ public static function firstDescendantNodeAfterOffset(Node $node, int $offset): return $node; } + public static function firstDescendantNodeBeforeOffset(Node $node, int $offset): Node { $lastNode = null; @@ -296,6 +297,7 @@ public static function firstDescendantNodeBeforeOffset(Node $node, int $offset): return $node; } + public static function lastDescendantNodeBeforeOffsetOfType(Node $node, int $offset, string $fqn): Node { $best = null; diff --git a/src/Core/Virtual/VirtualReflectionFunction.php b/src/Core/Virtual/VirtualReflectionFunction.php index 4f5d455b0..1e37a75ae 100644 --- a/src/Core/Virtual/VirtualReflectionFunction.php +++ b/src/Core/Virtual/VirtualReflectionFunction.php @@ -50,7 +50,6 @@ public static function empty( ); } - public function parameters(): ReflectionParameterCollection { return $this->parameters; diff --git a/tests/Unit/Bridge/Phpactor/DocblockParser/DocblockParserFactoryTest.php b/tests/Unit/Bridge/Phpactor/DocblockParser/DocblockParserFactoryTest.php index d666ce176..7e1bb35c8 100644 --- a/tests/Unit/Bridge/Phpactor/DocblockParser/DocblockParserFactoryTest.php +++ b/tests/Unit/Bridge/Phpactor/DocblockParser/DocblockParserFactoryTest.php @@ -37,6 +37,7 @@ class DocblockParserFactoryTest extends IntegrationTestCase { use ProphecyTrait; + /** * @dataProvider provideResolveType * @param Type|string $expected diff --git a/tests/Unit/Core/Reflector/SourceCode/ContextualSourceCodeReflectorTest.php b/tests/Unit/Core/Reflector/SourceCode/ContextualSourceCodeReflectorTest.php index 46771899b..92217b1d6 100644 --- a/tests/Unit/Core/Reflector/SourceCode/ContextualSourceCodeReflectorTest.php +++ b/tests/Unit/Core/Reflector/SourceCode/ContextualSourceCodeReflectorTest.php @@ -14,7 +14,9 @@ class ContextualSourceCodeReflectorTest extends TestCase { use ProphecyTrait; + const TEST_SOURCE_CODE = '