Commit ce5acf3
Use PHPDoc
The `string` is the type of each argument.
The `...` indicates that it is an array of that type, like
`function (string ...$classNames)` also would indicate.
Update code to PHPStan Level 3
Added ReturnTypeWillChange
Fix return type for Expression
Add type hints for returned variables
Add generic parameter for delimted list
Fixing type hints
Ignore co-variance error
Remove TODO - it already must always be a Node
Ignore error
Add missing types
Update phpstan to level 3
Add phpstan to dev reqs
No need to install phpstan independently
Do not override unary expression operand
It seems to me that the operand can be any expression
Added token to operand types -- should this be MissingToken?
Include tokens in return types
ExpressionStatement => EchoStatement
It seems this is always an EchoStatement not an ExpressionStatement
unaryExpressionOrHigher can return a ThrowExpression
Remove overridden property
Add Token to union
Remove QualifiedName and rename local variable
Remove unused import
Add return types
Remove trailing whitespace
Add MissingToken type
Ignore "should not happen" statement
Bump to level 4
Remove !is_null conditional branch - it always returns Node
NamespaceUseDeclaration#useClauses is technically nullable
NamespaceUseGroupCluase#functionOrConst can be NULL
Add TODO
Removed redundant condition (check)
Add return type
Add retutn type, remove inaccurate docblock
Fix bug with get string literal text, as it returned the quotes
Ignore assumed false-positive from PHPStan
If allowEmptyElements if `false`...
... then it MUST be true in the right hand side of ||
backslash can be NULL
BinaryExpresionOrHigher can return MIssingToken
Ignoring error to be safe (as commented) and more type hints
Set level to 4
Add explanation@param string ...$classNames
1 parent 6bd3e3b commit ce5acf3
File tree
13 files changed
+99
-29
lines changed- src
- Node
- Expression
- Statement
- tests/unit/Node
13 files changed
+99
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
| 440 | + | |
444 | 441 | | |
445 | 442 | | |
446 | 443 | | |
| |||
590 | 587 | | |
591 | 588 | | |
592 | 589 | | |
| 590 | + | |
593 | 591 | | |
594 | 592 | | |
595 | 593 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | | - | |
| 89 | + | |
92 | 90 | | |
93 | 91 | | |
94 | 92 | | |
| |||
157 | 155 | | |
158 | 156 | | |
159 | 157 | | |
160 | | - | |
161 | | - | |
162 | 158 | | |
163 | | - | |
| 159 | + | |
164 | 160 | | |
165 | 161 | | |
166 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments