From 5c9ea49f6e3a47cfbe186b1707d4352da8677d3d Mon Sep 17 00:00:00 2001 From: DerManoMann Date: Thu, 16 Jan 2025 08:56:19 +1300 Subject: [PATCH 1/2] Remove the deprecated `ProcessorInterface` --- phpstan-baseline.neon | 137 +++-------------------- src/Analysis.php | 5 +- src/Processors/AugmentParameters.php | 2 +- src/Processors/AugmentProperties.php | 2 +- src/Processors/AugmentRefs.php | 2 +- src/Processors/AugmentRequestBody.php | 2 +- src/Processors/AugmentSchemas.php | 2 +- src/Processors/AugmentTags.php | 2 +- src/Processors/BuildPaths.php | 2 +- src/Processors/CleanUnmerged.php | 2 +- src/Processors/CleanUnusedComponents.php | 2 +- src/Processors/DocBlockDescriptions.php | 2 +- src/Processors/ExpandClasses.php | 2 +- src/Processors/ExpandEnums.php | 2 +- src/Processors/ExpandTraits.php | 2 +- src/Processors/MergeIntoComponents.php | 2 +- src/Processors/MergeIntoOpenApi.php | 2 +- src/Processors/MergeJsonContent.php | 2 +- src/Processors/MergeXmlContent.php | 2 +- src/Processors/OperationId.php | 2 +- src/Processors/PathFilter.php | 2 +- src/Processors/ProcessorInterface.php | 14 --- 22 files changed, 39 insertions(+), 155 deletions(-) delete mode 100644 src/Processors/ProcessorInterface.php diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 19f8bf8e9..aca58faca 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,187 +1,86 @@ parameters: ignoreErrors: - - message: '#^Property OpenApi\\Annotations\\AbstractAnnotation\:\:\$x \(array\\) does not accept string\.$#' - identifier: assign.propertyType + message: "#^Property OpenApi\\\\Annotations\\\\AbstractAnnotation\\:\\:\\$x \\(array\\\\) does not accept string\\.$#" count: 1 path: Examples/processors/schema-query-parameter/SchemaQueryParameter.php - - message: '#^Attribute class JetBrains\\PhpStorm\\ArrayShape does not exist\.$#' - identifier: attribute.notFound + message: "#^Attribute class JetBrains\\\\PhpStorm\\\\ArrayShape does not exist\\.$#" count: 1 path: Examples/using-links-php81/User.php - - message: '#^Call to function method_exists\(\) with ReflectionProperty and ''isPromoted'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: src/Analysers/AttributeAnnotationFactory.php - - - - message: '#^Call to function method_exists\(\) with ReflectionClass\ and ''isEnum'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: src/Analysers/ReflectionAnalyser.php - - - - message: '#^Access to an undefined property OpenApi\\Annotations\\AbstractAnnotation\:\:\$description\.$#' - identifier: property.notFound + message: "#^Access to an undefined property OpenApi\\\\Annotations\\\\AbstractAnnotation\\:\\:\\$description\\.$#" count: 1 path: src/Annotations/AbstractAnnotation.php - - message: '#^Access to an undefined property OpenApi\\Annotations\\AbstractAnnotation\:\:\$summary\.$#' - identifier: property.notFound + message: "#^Access to an undefined property OpenApi\\\\Annotations\\\\AbstractAnnotation\\:\\:\\$summary\\.$#" count: 1 path: src/Annotations/AbstractAnnotation.php - - message: '#^Call to function property_exists\(\) with OpenApi\\Annotations\\AbstractAnnotation and ''_context'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: src/Annotations/AbstractAnnotation.php - - - - message: '#^Variable \$name might not be defined\.$#' - identifier: variable.undefined + message: "#^Variable \\$name might not be defined\\.$#" count: 2 path: src/Annotations/Components.php - - message: '#^Variable \$type might not be defined\.$#' - identifier: variable.undefined + message: "#^Variable \\$type might not be defined\\.$#" count: 1 path: src/Annotations/Components.php - - message: '#^Property OpenApi\\Annotations\\Flow\:\:\$scopes \(array\) does not accept stdClass\.$#' - identifier: assign.propertyType + message: "#^Property OpenApi\\\\Annotations\\\\Flow\\:\\:\\$scopes \\(array\\) does not accept stdClass\\.$#" count: 1 path: src/Annotations/Flow.php - - message: '#^Method OpenApi\\Processors\\AugmentParameters\:\:extractVarTypeAndDescription\(\) should return array\ but returns array\\.$#' - identifier: return.type + message: "#^Access to an undefined property object\\:\\:\\$enum\\.$#" count: 1 - path: src/Processors/AugmentParameters.php + path: src/Annotations/Schema.php - - message: '#^Strict comparison using \!\=\= between false and string will always evaluate to true\.$#' - identifier: notIdentical.alwaysTrue - count: 1 - path: src/Processors/AugmentParameters.php - - - - message: '#^Method OpenApi\\Processors\\AugmentProperties\:\:extractVarTypeAndDescription\(\) should return array\ but returns array\\.$#' - identifier: return.type - count: 1 - path: src/Processors/AugmentProperties.php - - - - message: '#^Strict comparison using \!\=\= between false and string will always evaluate to true\.$#' - identifier: notIdentical.alwaysTrue - count: 1 - path: src/Processors/AugmentProperties.php - - - - message: '#^Property OpenApi\\Annotations\\Schema\:\:\$properties \(array\\) does not accept string\.$#' - identifier: assign.propertyType + message: "#^Property OpenApi\\\\Annotations\\\\Schema\\:\\:\\$properties \\(array\\\\) does not accept string\\.$#" count: 1 path: src/Processors/AugmentSchemas.php - - message: '#^Method OpenApi\\Processors\\DocBlockDescriptions\:\:extractVarTypeAndDescription\(\) should return array\ but returns array\\.$#' - identifier: return.type - count: 1 - path: src/Processors/DocBlockDescriptions.php - - - - message: '#^Parameter \#1 \$annotation of method OpenApi\\Processors\\DocBlockDescriptions\:\:description\(\) expects OpenApi\\Annotations\\Operation\|OpenApi\\Annotations\\Parameter\|OpenApi\\Annotations\\Schema, OpenApi\\Annotations\\AbstractAnnotation given\.$#' - identifier: argument.type + message: "#^Parameter \\#1 \\$annotation of method OpenApi\\\\Processors\\\\DocBlockDescriptions\\:\\:description\\(\\) expects OpenApi\\\\Annotations\\\\Operation\\|OpenApi\\\\Annotations\\\\Parameter\\|OpenApi\\\\Annotations\\\\Schema, OpenApi\\\\Annotations\\\\AbstractAnnotation given\\.$#" count: 1 path: src/Processors/DocBlockDescriptions.php - - message: '#^Parameter \#1 \$annotation of method OpenApi\\Processors\\DocBlockDescriptions\:\:summaryAndDescription\(\) expects OpenApi\\Annotations\\Operation\|OpenApi\\Annotations\\Parameter\|OpenApi\\Annotations\\Schema, OpenApi\\Annotations\\AbstractAnnotation given\.$#' - identifier: argument.type + message: "#^Parameter \\#1 \\$annotation of method OpenApi\\\\Processors\\\\DocBlockDescriptions\\:\\:summaryAndDescription\\(\\) expects OpenApi\\\\Annotations\\\\Operation\\|OpenApi\\\\Annotations\\\\Parameter\\|OpenApi\\\\Annotations\\\\Schema, OpenApi\\\\Annotations\\\\AbstractAnnotation given\\.$#" count: 1 path: src/Processors/DocBlockDescriptions.php - - message: '#^Strict comparison using \!\=\= between false and string will always evaluate to true\.$#' - identifier: notIdentical.alwaysTrue - count: 1 - path: src/Processors/DocBlockDescriptions.php - - - - message: '#^Property OpenApi\\Annotations\\Schema\:\:\$examples \(array\\) does not accept string\.$#' - identifier: assign.propertyType + message: "#^Property OpenApi\\\\Annotations\\\\Schema\\:\\:\\$examples \\(array\\\\) does not accept string\\.$#" count: 1 path: src/Processors/MergeJsonContent.php - - message: '#^Property OpenApi\\Annotations\\Schema\:\:\$examples \(array\\) does not accept string\.$#' - identifier: assign.propertyType + message: "#^Property OpenApi\\\\Annotations\\\\Schema\\:\\:\\$examples \\(array\\\\) does not accept string\\.$#" count: 1 path: src/Processors/MergeXmlContent.php - - message: '#^Parameter \#1 \$callback of function spl_autoload_register expects \(callable\(string\)\: void\)\|null, array\{Composer\\Autoload\\ClassLoader, ''findFile''\} given\.$#' - identifier: argument.type + message: "#^Parameter \\#1 \\$callback of function spl_autoload_register expects \\(callable\\(string\\)\\: void\\)\\|null, array\\{Composer\\\\Autoload\\\\ClassLoader, 'findFile'\\} given\\.$#" count: 1 path: tests/Analysers/ComposerAutoloaderScannerTest.php - - message: '#^Access to an undefined property OpenApi\\Analysers\\AnnotationFactoryInterface\:\:\$reflectors\.$#' - identifier: property.notFound + message: "#^Access to an undefined property OpenApi\\\\Analysers\\\\AnnotationFactoryInterface\\:\\:\\$reflectors\\.$#" count: 2 path: tests/Analysers/ReflectionAnalyserTest.php - - message: '#^Access to an undefined property Reflector\:\:\$name\.$#' - identifier: property.notFound + message: "#^Access to an undefined property Reflector\\:\\:\\$name\\.$#" count: 1 path: tests/Analysers/ReflectionAnalyserTest.php - - message: '#^Call to an undefined method ReflectionType\:\:getName\(\)\.$#' - identifier: method.notFound + message: "#^Call to an undefined method ReflectionType\\:\\:getName\\(\\)\\.$#" count: 1 path: tests/Annotations/AttributesSyncTest.php - - - - message: '#^Method OpenApi\\Tests\\Processors\\AugmentParametersTest\:\:extractVarTypeAndDescription\(\) should return array\ but returns array\\.$#' - identifier: return.type - count: 1 - path: tests/Processors/AugmentParametersTest.php - - - - message: '#^Strict comparison using \!\=\= between false and string will always evaluate to true\.$#' - identifier: notIdentical.alwaysTrue - count: 1 - path: tests/Processors/AugmentParametersTest.php - - - - message: '#^Method OpenApi\\Tests\\Processors\\AugmentRefsTest\:\:extractVarTypeAndDescription\(\) should return array\ but returns array\\.$#' - identifier: return.type - count: 1 - path: tests/Processors/AugmentRefsTest.php - - - - message: '#^Strict comparison using \!\=\= between false and string will always evaluate to true\.$#' - identifier: notIdentical.alwaysTrue - count: 1 - path: tests/Processors/AugmentRefsTest.php - - - - message: '#^Method OpenApi\\Tests\\Processors\\DocBlockDescriptionsTest\:\:extractVarTypeAndDescription\(\) should return array\ but returns array\\.$#' - identifier: return.type - count: 1 - path: tests/Processors/DocBlockDescriptionsTest.php - - - - message: '#^Strict comparison using \!\=\= between false and string will always evaluate to true\.$#' - identifier: notIdentical.alwaysTrue - count: 1 - path: tests/Processors/DocBlockDescriptionsTest.php diff --git a/src/Analysis.php b/src/Analysis.php index 50bd00e94..8451069d4 100644 --- a/src/Analysis.php +++ b/src/Analysis.php @@ -7,7 +7,6 @@ namespace OpenApi; use OpenApi\Annotations as OA; -use OpenApi\Processors\ProcessorInterface; /** * Result of the analyser. @@ -405,11 +404,11 @@ public function split() /** * Apply the processor(s). * - * @param callable|ProcessorInterface|array $processors One or more processors + * @param callable|array $processors One or more processors */ public function process($processors = null): void { - if (is_array($processors) === false && is_callable($processors) || $processors instanceof ProcessorInterface) { + if (false === is_array($processors) && is_callable($processors)) { $processors = [$processors]; } diff --git a/src/Processors/AugmentParameters.php b/src/Processors/AugmentParameters.php index fbe0f5792..e70a81f2a 100644 --- a/src/Processors/AugmentParameters.php +++ b/src/Processors/AugmentParameters.php @@ -14,7 +14,7 @@ /** * Augments shared and operations parameters from docblock comments. */ -class AugmentParameters implements ProcessorInterface +class AugmentParameters { use DocblockTrait; diff --git a/src/Processors/AugmentProperties.php b/src/Processors/AugmentProperties.php index 139168e28..01052183d 100644 --- a/src/Processors/AugmentProperties.php +++ b/src/Processors/AugmentProperties.php @@ -14,7 +14,7 @@ /** * Use the property context to extract useful information and inject that into the annotation. */ -class AugmentProperties implements ProcessorInterface +class AugmentProperties { use Concerns\DocblockTrait; use Concerns\RefTrait; diff --git a/src/Processors/AugmentRefs.php b/src/Processors/AugmentRefs.php index b120d2954..06c82905f 100644 --- a/src/Processors/AugmentRefs.php +++ b/src/Processors/AugmentRefs.php @@ -10,7 +10,7 @@ use OpenApi\Annotations as OA; use OpenApi\Generator; -class AugmentRefs implements ProcessorInterface +class AugmentRefs { use Concerns\RefTrait; diff --git a/src/Processors/AugmentRequestBody.php b/src/Processors/AugmentRequestBody.php index 77733a755..132c316d1 100644 --- a/src/Processors/AugmentRequestBody.php +++ b/src/Processors/AugmentRequestBody.php @@ -13,7 +13,7 @@ /** * Use the RequestBody context to extract useful information and inject that into the annotation. */ -class AugmentRequestBody implements ProcessorInterface +class AugmentRequestBody { public function __invoke(Analysis $analysis) { diff --git a/src/Processors/AugmentSchemas.php b/src/Processors/AugmentSchemas.php index ebc4d0b7e..97d1b2af3 100644 --- a/src/Processors/AugmentSchemas.php +++ b/src/Processors/AugmentSchemas.php @@ -16,7 +16,7 @@ * * Merges properties. */ -class AugmentSchemas implements ProcessorInterface +class AugmentSchemas { public function __invoke(Analysis $analysis) { diff --git a/src/Processors/AugmentTags.php b/src/Processors/AugmentTags.php index 4a450b9c2..9093a1ae7 100644 --- a/src/Processors/AugmentTags.php +++ b/src/Processors/AugmentTags.php @@ -13,7 +13,7 @@ /** * Ensures that all tags used on operations also exist in the global tags list. */ -class AugmentTags implements ProcessorInterface +class AugmentTags { /** @var array */ protected array $whitelist = []; diff --git a/src/Processors/BuildPaths.php b/src/Processors/BuildPaths.php index 6d6d6ce45..84ed1006d 100644 --- a/src/Processors/BuildPaths.php +++ b/src/Processors/BuildPaths.php @@ -14,7 +14,7 @@ /** * Build the openapi->paths using the detected `@OA\PathItem` and `@OA\Operation` (`@OA\Get`, `@OA\Post`, etc). */ -class BuildPaths implements ProcessorInterface +class BuildPaths { public function __invoke(Analysis $analysis) { diff --git a/src/Processors/CleanUnmerged.php b/src/Processors/CleanUnmerged.php index 6b3e2147d..5a694f2de 100644 --- a/src/Processors/CleanUnmerged.php +++ b/src/Processors/CleanUnmerged.php @@ -9,7 +9,7 @@ use OpenApi\Analysis; use OpenApi\Annotations as OA; -class CleanUnmerged implements ProcessorInterface +class CleanUnmerged { public function __invoke(Analysis $analysis) { diff --git a/src/Processors/CleanUnusedComponents.php b/src/Processors/CleanUnusedComponents.php index ecd4b0c62..035e1f9b7 100644 --- a/src/Processors/CleanUnusedComponents.php +++ b/src/Processors/CleanUnusedComponents.php @@ -13,7 +13,7 @@ /** * Tracks the use of all Components and removed unused schemas. */ -class CleanUnusedComponents implements ProcessorInterface +class CleanUnusedComponents { use Concerns\AnnotationTrait; diff --git a/src/Processors/DocBlockDescriptions.php b/src/Processors/DocBlockDescriptions.php index 59070fd34..974bc242d 100644 --- a/src/Processors/DocBlockDescriptions.php +++ b/src/Processors/DocBlockDescriptions.php @@ -16,7 +16,7 @@ * * Use `null`, for example: `@Annotation(description=null)`, if you don't want the annotation to have a description. */ -class DocBlockDescriptions implements ProcessorInterface +class DocBlockDescriptions { use Concerns\DocblockTrait; diff --git a/src/Processors/ExpandClasses.php b/src/Processors/ExpandClasses.php index 9ba659736..acee10541 100644 --- a/src/Processors/ExpandClasses.php +++ b/src/Processors/ExpandClasses.php @@ -17,7 +17,7 @@ * - else * => merge ancestor properties into the schema. */ -class ExpandClasses implements ProcessorInterface +class ExpandClasses { use Concerns\MergePropertiesTrait; diff --git a/src/Processors/ExpandEnums.php b/src/Processors/ExpandEnums.php index c3ce831e7..8e712bc54 100644 --- a/src/Processors/ExpandEnums.php +++ b/src/Processors/ExpandEnums.php @@ -16,7 +16,7 @@ * * Determines `schema`, `enum` and `type`. */ -class ExpandEnums implements ProcessorInterface +class ExpandEnums { use Concerns\TypesTrait; diff --git a/src/Processors/ExpandTraits.php b/src/Processors/ExpandTraits.php index 5cd7e2a45..01090d119 100644 --- a/src/Processors/ExpandTraits.php +++ b/src/Processors/ExpandTraits.php @@ -15,7 +15,7 @@ * - merge trait annotations/methods/properties into the schema if the trait does not have a schema itself * - inherit from the trait if it has a schema (allOf). */ -class ExpandTraits implements ProcessorInterface +class ExpandTraits { use Concerns\MergePropertiesTrait; diff --git a/src/Processors/MergeIntoComponents.php b/src/Processors/MergeIntoComponents.php index 8a024f923..03dbaab9c 100644 --- a/src/Processors/MergeIntoComponents.php +++ b/src/Processors/MergeIntoComponents.php @@ -14,7 +14,7 @@ /** * Merge reusable annotation into @OA\Schemas. */ -class MergeIntoComponents implements ProcessorInterface +class MergeIntoComponents { public function __invoke(Analysis $analysis) { diff --git a/src/Processors/MergeIntoOpenApi.php b/src/Processors/MergeIntoOpenApi.php index 5611ba4f7..597cb14e7 100644 --- a/src/Processors/MergeIntoOpenApi.php +++ b/src/Processors/MergeIntoOpenApi.php @@ -14,7 +14,7 @@ /** * Merge all @OA\OpenApi annotations into one. */ -class MergeIntoOpenApi implements ProcessorInterface +class MergeIntoOpenApi { public function __invoke(Analysis $analysis) { diff --git a/src/Processors/MergeJsonContent.php b/src/Processors/MergeJsonContent.php index c52c1bfd5..ab8d804c3 100644 --- a/src/Processors/MergeJsonContent.php +++ b/src/Processors/MergeJsonContent.php @@ -14,7 +14,7 @@ /** * Split JsonContent into Schema and MediaType. */ -class MergeJsonContent implements ProcessorInterface +class MergeJsonContent { public function __invoke(Analysis $analysis) { diff --git a/src/Processors/MergeXmlContent.php b/src/Processors/MergeXmlContent.php index 1f491889e..45590dccd 100644 --- a/src/Processors/MergeXmlContent.php +++ b/src/Processors/MergeXmlContent.php @@ -14,7 +14,7 @@ /** * Split XmlContent into Schema and MediaType. */ -class MergeXmlContent implements ProcessorInterface +class MergeXmlContent { public function __invoke(Analysis $analysis) { diff --git a/src/Processors/OperationId.php b/src/Processors/OperationId.php index 84d7ac60b..bb874c27d 100644 --- a/src/Processors/OperationId.php +++ b/src/Processors/OperationId.php @@ -13,7 +13,7 @@ /** * Generate the OperationId based on the context of the OpenApi annotation. */ -class OperationId implements ProcessorInterface +class OperationId { protected bool $hash; diff --git a/src/Processors/PathFilter.php b/src/Processors/PathFilter.php index 079a098db..58716071e 100644 --- a/src/Processors/PathFilter.php +++ b/src/Processors/PathFilter.php @@ -16,7 +16,7 @@ * If no `tags` or `paths` filters are set, no filtering is performed. * All filter (regular) expressions must be enclosed within delimiter characters as they are used as-is. */ -class PathFilter implements ProcessorInterface +class PathFilter { use AnnotationTrait; diff --git a/src/Processors/ProcessorInterface.php b/src/Processors/ProcessorInterface.php deleted file mode 100644 index 67e8e820c..000000000 --- a/src/Processors/ProcessorInterface.php +++ /dev/null @@ -1,14 +0,0 @@ - Date: Thu, 16 Jan 2025 08:59:51 +1300 Subject: [PATCH 2/2] . --- phpstan-baseline.neon | 137 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 119 insertions(+), 18 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index aca58faca..19f8bf8e9 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,86 +1,187 @@ parameters: ignoreErrors: - - message: "#^Property OpenApi\\\\Annotations\\\\AbstractAnnotation\\:\\:\\$x \\(array\\\\) does not accept string\\.$#" + message: '#^Property OpenApi\\Annotations\\AbstractAnnotation\:\:\$x \(array\\) does not accept string\.$#' + identifier: assign.propertyType count: 1 path: Examples/processors/schema-query-parameter/SchemaQueryParameter.php - - message: "#^Attribute class JetBrains\\\\PhpStorm\\\\ArrayShape does not exist\\.$#" + message: '#^Attribute class JetBrains\\PhpStorm\\ArrayShape does not exist\.$#' + identifier: attribute.notFound count: 1 path: Examples/using-links-php81/User.php - - message: "#^Access to an undefined property OpenApi\\\\Annotations\\\\AbstractAnnotation\\:\\:\\$description\\.$#" + message: '#^Call to function method_exists\(\) with ReflectionProperty and ''isPromoted'' will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: src/Analysers/AttributeAnnotationFactory.php + + - + message: '#^Call to function method_exists\(\) with ReflectionClass\ and ''isEnum'' will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: src/Analysers/ReflectionAnalyser.php + + - + message: '#^Access to an undefined property OpenApi\\Annotations\\AbstractAnnotation\:\:\$description\.$#' + identifier: property.notFound count: 1 path: src/Annotations/AbstractAnnotation.php - - message: "#^Access to an undefined property OpenApi\\\\Annotations\\\\AbstractAnnotation\\:\\:\\$summary\\.$#" + message: '#^Access to an undefined property OpenApi\\Annotations\\AbstractAnnotation\:\:\$summary\.$#' + identifier: property.notFound count: 1 path: src/Annotations/AbstractAnnotation.php - - message: "#^Variable \\$name might not be defined\\.$#" + message: '#^Call to function property_exists\(\) with OpenApi\\Annotations\\AbstractAnnotation and ''_context'' will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: src/Annotations/AbstractAnnotation.php + + - + message: '#^Variable \$name might not be defined\.$#' + identifier: variable.undefined count: 2 path: src/Annotations/Components.php - - message: "#^Variable \\$type might not be defined\\.$#" + message: '#^Variable \$type might not be defined\.$#' + identifier: variable.undefined count: 1 path: src/Annotations/Components.php - - message: "#^Property OpenApi\\\\Annotations\\\\Flow\\:\\:\\$scopes \\(array\\) does not accept stdClass\\.$#" + message: '#^Property OpenApi\\Annotations\\Flow\:\:\$scopes \(array\) does not accept stdClass\.$#' + identifier: assign.propertyType count: 1 path: src/Annotations/Flow.php - - message: "#^Access to an undefined property object\\:\\:\\$enum\\.$#" + message: '#^Method OpenApi\\Processors\\AugmentParameters\:\:extractVarTypeAndDescription\(\) should return array\ but returns array\\.$#' + identifier: return.type count: 1 - path: src/Annotations/Schema.php + path: src/Processors/AugmentParameters.php - - message: "#^Property OpenApi\\\\Annotations\\\\Schema\\:\\:\\$properties \\(array\\\\) does not accept string\\.$#" + message: '#^Strict comparison using \!\=\= between false and string will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: src/Processors/AugmentParameters.php + + - + message: '#^Method OpenApi\\Processors\\AugmentProperties\:\:extractVarTypeAndDescription\(\) should return array\ but returns array\\.$#' + identifier: return.type + count: 1 + path: src/Processors/AugmentProperties.php + + - + message: '#^Strict comparison using \!\=\= between false and string will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: src/Processors/AugmentProperties.php + + - + message: '#^Property OpenApi\\Annotations\\Schema\:\:\$properties \(array\\) does not accept string\.$#' + identifier: assign.propertyType count: 1 path: src/Processors/AugmentSchemas.php - - message: "#^Parameter \\#1 \\$annotation of method OpenApi\\\\Processors\\\\DocBlockDescriptions\\:\\:description\\(\\) expects OpenApi\\\\Annotations\\\\Operation\\|OpenApi\\\\Annotations\\\\Parameter\\|OpenApi\\\\Annotations\\\\Schema, OpenApi\\\\Annotations\\\\AbstractAnnotation given\\.$#" + message: '#^Method OpenApi\\Processors\\DocBlockDescriptions\:\:extractVarTypeAndDescription\(\) should return array\ but returns array\\.$#' + identifier: return.type + count: 1 + path: src/Processors/DocBlockDescriptions.php + + - + message: '#^Parameter \#1 \$annotation of method OpenApi\\Processors\\DocBlockDescriptions\:\:description\(\) expects OpenApi\\Annotations\\Operation\|OpenApi\\Annotations\\Parameter\|OpenApi\\Annotations\\Schema, OpenApi\\Annotations\\AbstractAnnotation given\.$#' + identifier: argument.type count: 1 path: src/Processors/DocBlockDescriptions.php - - message: "#^Parameter \\#1 \\$annotation of method OpenApi\\\\Processors\\\\DocBlockDescriptions\\:\\:summaryAndDescription\\(\\) expects OpenApi\\\\Annotations\\\\Operation\\|OpenApi\\\\Annotations\\\\Parameter\\|OpenApi\\\\Annotations\\\\Schema, OpenApi\\\\Annotations\\\\AbstractAnnotation given\\.$#" + message: '#^Parameter \#1 \$annotation of method OpenApi\\Processors\\DocBlockDescriptions\:\:summaryAndDescription\(\) expects OpenApi\\Annotations\\Operation\|OpenApi\\Annotations\\Parameter\|OpenApi\\Annotations\\Schema, OpenApi\\Annotations\\AbstractAnnotation given\.$#' + identifier: argument.type count: 1 path: src/Processors/DocBlockDescriptions.php - - message: "#^Property OpenApi\\\\Annotations\\\\Schema\\:\\:\\$examples \\(array\\\\) does not accept string\\.$#" + message: '#^Strict comparison using \!\=\= between false and string will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: src/Processors/DocBlockDescriptions.php + + - + message: '#^Property OpenApi\\Annotations\\Schema\:\:\$examples \(array\\) does not accept string\.$#' + identifier: assign.propertyType count: 1 path: src/Processors/MergeJsonContent.php - - message: "#^Property OpenApi\\\\Annotations\\\\Schema\\:\\:\\$examples \\(array\\\\) does not accept string\\.$#" + message: '#^Property OpenApi\\Annotations\\Schema\:\:\$examples \(array\\) does not accept string\.$#' + identifier: assign.propertyType count: 1 path: src/Processors/MergeXmlContent.php - - message: "#^Parameter \\#1 \\$callback of function spl_autoload_register expects \\(callable\\(string\\)\\: void\\)\\|null, array\\{Composer\\\\Autoload\\\\ClassLoader, 'findFile'\\} given\\.$#" + message: '#^Parameter \#1 \$callback of function spl_autoload_register expects \(callable\(string\)\: void\)\|null, array\{Composer\\Autoload\\ClassLoader, ''findFile''\} given\.$#' + identifier: argument.type count: 1 path: tests/Analysers/ComposerAutoloaderScannerTest.php - - message: "#^Access to an undefined property OpenApi\\\\Analysers\\\\AnnotationFactoryInterface\\:\\:\\$reflectors\\.$#" + message: '#^Access to an undefined property OpenApi\\Analysers\\AnnotationFactoryInterface\:\:\$reflectors\.$#' + identifier: property.notFound count: 2 path: tests/Analysers/ReflectionAnalyserTest.php - - message: "#^Access to an undefined property Reflector\\:\\:\\$name\\.$#" + message: '#^Access to an undefined property Reflector\:\:\$name\.$#' + identifier: property.notFound count: 1 path: tests/Analysers/ReflectionAnalyserTest.php - - message: "#^Call to an undefined method ReflectionType\\:\\:getName\\(\\)\\.$#" + message: '#^Call to an undefined method ReflectionType\:\:getName\(\)\.$#' + identifier: method.notFound count: 1 path: tests/Annotations/AttributesSyncTest.php + + - + message: '#^Method OpenApi\\Tests\\Processors\\AugmentParametersTest\:\:extractVarTypeAndDescription\(\) should return array\ but returns array\\.$#' + identifier: return.type + count: 1 + path: tests/Processors/AugmentParametersTest.php + + - + message: '#^Strict comparison using \!\=\= between false and string will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: tests/Processors/AugmentParametersTest.php + + - + message: '#^Method OpenApi\\Tests\\Processors\\AugmentRefsTest\:\:extractVarTypeAndDescription\(\) should return array\ but returns array\\.$#' + identifier: return.type + count: 1 + path: tests/Processors/AugmentRefsTest.php + + - + message: '#^Strict comparison using \!\=\= between false and string will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: tests/Processors/AugmentRefsTest.php + + - + message: '#^Method OpenApi\\Tests\\Processors\\DocBlockDescriptionsTest\:\:extractVarTypeAndDescription\(\) should return array\ but returns array\\.$#' + identifier: return.type + count: 1 + path: tests/Processors/DocBlockDescriptionsTest.php + + - + message: '#^Strict comparison using \!\=\= between false and string will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: tests/Processors/DocBlockDescriptionsTest.php