Repository navigation
Expand file tree
/
Copy pathphpstan-baseline-demos.php
More file actions
107 lines (105 loc) · 4.38 KB
/
Copy pathphpstan-baseline-demos.php
File metadata and controls
107 lines (105 loc) · 4.38 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php declare(strict_types = 1);
$ignoreErrors = [];
$ignoreErrors[] = [
'message' => '#^Cannot access offset non\\-falsy\\-string on mixed\\.$#',
'identifier' => 'offsetAccess.nonOffsetAccessible',
'count' => 2,
'path' => __DIR__ . '/demos/Demo/Aspect/CachingAspect.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#1 \\$haystack of function str_starts_with expects string, mixed given\\.$#',
'identifier' => 'argument.type',
'count' => 2,
'path' => __DIR__ . '/demos/Demo/Aspect/DynamicMethodsAspect.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#4 \\(mixed\\) of echo cannot be converted to string\\.$#',
'identifier' => 'echo.nonString',
'count' => 2,
'path' => __DIR__ . '/demos/Demo/Aspect/DynamicMethodsAspect.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot access property \\$name on Demo\\\\Example\\\\OrderStatus\\|null\\.$#',
'identifier' => 'property.nonObject',
'count' => 1,
'path' => __DIR__ . '/demos/Demo/Aspect/EnumInterceptorAspect.php',
];
$ignoreErrors[] = [
'message' => '#^Part \\$label \\(mixed\\) of encapsed string cannot be cast to string\\.$#',
'identifier' => 'encapsedStringPart.nonString',
'count' => 1,
'path' => __DIR__ . '/demos/Demo/Aspect/EnumInterceptorAspect.php',
];
$ignoreErrors[] = [
'message' => '#^Trait Demo\\\\Aspect\\\\Introduce\\\\StringableImpl is used zero times and is not analysed\\.$#',
'identifier' => 'trait.unused',
'count' => 1,
'path' => __DIR__ . '/demos/Demo/Aspect/Introduce/StringableImpl.php',
];
$ignoreErrors[] = [
'message' => '#^Class Demo\\\\Example\\\\DynamicMethodsDemo has PHPDoc tag @method for method find\\(\\) parameter \\#1 \\$args with no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/demos/Demo/Example/DynamicMethodsDemo.php',
];
$ignoreErrors[] = [
'message' => '#^Method Demo\\\\Example\\\\DynamicMethodsDemo\\:\\:__call\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/demos/Demo/Example/DynamicMethodsDemo.php',
];
$ignoreErrors[] = [
'message' => '#^Method Demo\\\\Example\\\\DynamicMethodsDemo\\:\\:__callStatic\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/demos/Demo/Example/DynamicMethodsDemo.php',
];
$ignoreErrors[] = [
'message' => '#^Unsafe usage of new static\\(\\)\\.$#',
'identifier' => 'new.static',
'count' => 1,
'path' => __DIR__ . '/demos/Demo/Example/LoggingDemo.php',
];
$ignoreErrors[] = [
'message' => '#^Property Demo\\\\Example\\\\PropertyDemo\\:\\:\\$indirectModificationCheck type has no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/demos/Demo/Example/PropertyDemo.php',
];
$ignoreErrors[] = [
'message' => '#^Method Demo\\\\Example\\\\UserFluentDemo\\:\\:setName\\(\\) has no return type specified\\.$#',
'identifier' => 'missingType.return',
'count' => 1,
'path' => __DIR__ . '/demos/Demo/Example/UserFluentDemo.php',
];
$ignoreErrors[] = [
'message' => '#^Method Demo\\\\Example\\\\UserFluentDemo\\:\\:setPassword\\(\\) has no return type specified\\.$#',
'identifier' => 'missingType.return',
'count' => 1,
'path' => __DIR__ . '/demos/Demo/Example/UserFluentDemo.php',
];
$ignoreErrors[] = [
'message' => '#^Method Demo\\\\Example\\\\UserFluentDemo\\:\\:setSurname\\(\\) has no return type specified\\.$#',
'identifier' => 'missingType.return',
'count' => 1,
'path' => __DIR__ . '/demos/Demo/Example/UserFluentDemo.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot call method setPassword\\(\\) on mixed\\.$#',
'identifier' => 'method.nonObject',
'count' => 1,
'path' => __DIR__ . '/demos/Demo/Showcase/ShowcaseCatalog.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot call method setSurname\\(\\) on mixed\\.$#',
'identifier' => 'method.nonObject',
'count' => 1,
'path' => __DIR__ . '/demos/Demo/Showcase/ShowcaseCatalog.php',
];
$ignoreErrors[] = [
'message' => '#^Instanceof between Demo\\\\Example\\\\UserFluentDemo and Go\\\\Aop\\\\Proxy will always evaluate to false\\.$#',
'identifier' => 'instanceof.alwaysFalse',
'count' => 1,
'path' => __DIR__ . '/demos/Demo/Showcase/ShowcaseCatalog.php',
];
return ['parameters' => ['ignoreErrors' => $ignoreErrors]];