forked from phpDocumentor/phpDocumentor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpstan.neon
80 lines (66 loc) · 4.93 KB
/
phpstan.neon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
includes:
- /composer/vendor/phpstan/phpstan-webmozart-assert/extension.neon
- ./vendor/phpdocumentor/graphviz/extension.neon
parameters:
level: 6
inferPrivatePropertyTypeFromConstructor: true
treatPhpDocTypesAsCertain: false
ignoreErrors:
# PHPStan does not play nice with Symfony Config's fluid interface
- '#.*NodeDefinition::prototype.*#'
- '#.*NodeDefinition::addDefaultChildrenIfNoneSet.*#'
- '#.*NodeDefinition::fixXmlConfig.*#'
- '#.*NodeDefinition::addDefaultsIfNotSet.*#'
# FlyFinder plugin adds a find method to FlySystem's Filesystem
- '#Call to an undefined method League\\Flysystem\\Filesystem::find\(\)#'
- '#Call to an undefined method League\\Flysystem\\FilesystemInterface::find\(\)#'
# Filter nodes by callable in not understanded
- '#Method phpDocumentor\\Guides\\Nodes\\DocumentNode::getTocs\(\) should return array<phpDocumentor\\Guides\\Nodes\\TocNode> but returns array<phpDocumentor\\Guides\\Nodes\\Node>\.#'
# Bad design of descriptors.
- '#Access to an undefined property phpDocumentor\\Descriptor\\Collection<phpDocumentor\\Descriptor\\Collection<phpDocumentor\\Descriptor\\DescriptorAbstract>>::\$[a-z]+#'
# https://github.com/phpDocumentor/phpDocumentor/issues/2279
- '#Instanceof between phpDocumentor\\Descriptor\\Collection<phpDocumentor\\Descriptor\\InterfaceDescriptor\|phpDocumentor\\Reflection\\Fqsen>\|phpDocumentor\\Reflection\\Fqsen\|string\|null and phpDocumentor\\Descriptor\\InterfaceDescriptor will always evaluate to false\.#'
# phpstan/phpstan/issues/3951
- '#Method phpDocumentor\\Descriptor\\ProjectDescriptorBuilder::filterDescriptor\(\) should return TDescriptor of phpDocumentor\\Descriptor\\Descriptor\|null but returns phpDocumentor\\Descriptor\\Filter\\Filterable\|null\.#'
# PHPStan has issue when involving templates and parent types
- '#Parameter \#1 \$matcher of method phpDocumentor\\Descriptor\\Builder\\AssemblerFactory::(register|registerFallback)\(\) expects phpDocumentor\\Descriptor\\Builder\\Matcher<object>, phpDocumentor\\Descriptor\\Builder\\Matcher<.+> given\.#'
# PHPStan doesn't support inheritance of TDescriptor
- '#Parameter \#2 \$assembler of method phpDocumentor\\Descriptor\\Builder\\AssemblerFactory::(register|registerFallback)\(\) expects phpDocumentor\\Descriptor\\Builder\\AssemblerInterface.* given\.#'
# Design improvement of configuration needed
- '#Parameter \#1 \$templates of method phpDocumentor\\Transformer\\Template\\Factory::getTemplates\(\) expects array<int, array\(.*\)>, array<int, string>&nonEmpty given\.#'
# Advanced transformations of array. PHPStan doesn't seem to keep nonEmpty flag through some array functions
- '#Method phpDocumentor\\Configuration\\Definition\\Version2::upgrade\(\) should return.+#'
-
message: "#^Parameter \\#1 \\$value of method phpDocumentor\\\\GraphViz\\\\Graph\\:\\:setCenter\\(\\) expects bool, string given\\.$#"
count: 1
path: src/phpDocumentor/Transformer/Writer/Graph/GraphVizClassDiagram.php
-
message: "#^Parameter \\#1 \\$value of method phpDocumentor\\\\GraphViz\\\\Graph\\:\\:setConcentrate\\(\\) expects bool, string given\\.$#"
count: 1
path: src/phpDocumentor/Transformer/Writer/Graph/GraphVizClassDiagram.php
-
message: "#^Parameter \\#1 \\$value of method phpDocumentor\\\\GraphViz\\\\Graph\\:\\:setRankSep\\(\\) expects float, string given\\.$#"
count: 1
path: src/phpDocumentor/Transformer/Writer/Graph/GraphVizClassDiagram.php
-
message: "#^Parameter \\#1 \\$value of method phpDocumentor\\\\GraphViz\\\\Node\\:\\:setFontSize\\(\\) expects float, string given\\.$#"
count: 1
path: src/phpDocumentor/Transformer/Writer/Graph/GraphVizClassDiagram.php
-
message: "#^Parameter \\#1 \\$value of method phpDocumentor\\\\GraphViz\\\\Graph\\:\\:setFontSize\\(\\) expects float, string given\\.$#"
count: 1
path: src/phpDocumentor/Transformer/Writer/Graph/GraphVizClassDiagram.php
excludes_analyse:
#test data
- %currentWorkingDirectory%/tests/features/**/*.php
- %currentWorkingDirectory%/tests/data/*.php
- %currentWorkingDirectory%/tests/features/assets/**/*.php
- %currentWorkingDirectory%/tests/ReferenceImplementation.php
# needs adjustment of interface in phpDocumentor/reflection in order to be able to typehint the command
- %currentWorkingDirectory%/src/phpDocumentor/Parser/Middleware/CacheMiddleware.php
# phpunit TestCase while having to use a composer-global install ("Class PHPUnit\\Framework\\TestCase not found and could not be autoloaded")
- %currentWorkingDirectory%/tests/unit/**/*.php
- %currentWorkingDirectory%/tests/integration/**/*.php
- %currentWorkingDirectory%/tests/functional/**/*.php
- %currentWorkingDirectory%/incubator/*/tests/unit/*.php
- %currentWorkingDirectory%/incubator/*/tests/unit/**/*.php