Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/examples/specs/using-links/attributes/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class User
#[MyAttribute]
public $uuid;

/** @phpstan-ignore attribute.notFound */
#[ArrayShape(['ping' => 'pong'])]
public array $arrayShape;
}
36 changes: 0 additions & 36 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
parameters:
ignoreErrors:
-
message: '#^Property OpenApi\\Annotations\\AbstractAnnotation\:\:\$x \(array\<string, mixed\>\) does not accept string\.$#'
identifier: assign.propertyType
count: 1
path: docs/examples/processors/schema-query-parameter/SchemaQueryParameter.php

-
message: '#^Attribute class JetBrains\\PhpStorm\\ArrayShape does not exist\.$#'
identifier: attribute.notFound
count: 1
path: docs/examples/specs/using-links/attributes/User.php

-
message: '#^Call to an undefined method Reflector\:\:getAttributes\(\)\.$#'
identifier: method.notFound
Expand Down Expand Up @@ -54,12 +42,6 @@ parameters:
count: 1
path: src/Processors/AugmentProperties.php

-
message: '#^Property OpenApi\\Annotations\\Schema\:\:\$properties \(array\<OpenApi\\Annotations\\Property\>\) 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\.$#'
identifier: argument.type
Expand All @@ -78,24 +60,6 @@ parameters:
count: 1
path: src/Processors/DocBlockDescriptions.php

-
message: '#^Property OpenApi\\Annotations\\JsonContent\:\:\$encoding \(array\<OpenApi\\Annotations\\Encoding\>\) does not accept string\.$#'
identifier: assign.propertyType
count: 1
path: src/Processors/MergeJsonContent.php

-
message: '#^Property OpenApi\\Annotations\\Schema\:\:\$examples \(array\<OpenApi\\Annotations\\Examples\>\) does not accept string\.$#'
identifier: assign.propertyType
count: 1
path: src/Processors/MergeJsonContent.php

-
message: '#^Property OpenApi\\Annotations\\Schema\:\:\$examples \(array\<OpenApi\\Annotations\\Examples\>\) 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\.$#'
identifier: argument.type
Expand Down
16 changes: 13 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ parameters:
- 'tests/Fixtures/*'
treatPhpDocTypesAsCertain: false
ignoreErrors:
- '#does not accept default value of type #'
## Examples
- '#^Property [a-zA-Z0-9\\]+::\$[a-zA-Z]+ is unused.$#'
-
# ignore Generator::UNDEFINED default value
message: '#OpenApi\\Annotations#'
identifier: property.defaultValue
-
# ignore unused example fixtures
message: '#OpenApi\\Examples#'
identifier: property.unused
-
# ignore assigning Generator::UNDEFINED as property value
message: '#Property OpenApi\\Annotations.*::\$.* does not accept string.#'
identifier: assign.propertyType