File tree Expand file tree Collapse file tree 8 files changed +31
-9
lines changed Expand file tree Collapse file tree 8 files changed +31
-9
lines changed Original file line number Diff line number Diff line change 8
8
- ' 7.1'
9
9
- ' 7.2'
10
10
- ' 7.3'
11
+ - ' 7.4'
11
12
12
13
env :
13
14
global :
20
21
directories :
21
22
- $HOME/.composer/cache/files
22
23
23
- before_install : composer self-update
24
-
25
24
before_install :
26
25
- composer self-update
27
26
- if [ -x .travis/before_install_${TARGET}.sh ]; then .travis/before_install_${TARGET}.sh; fi;
@@ -34,4 +33,3 @@ script:
34
33
35
34
after_success :
36
35
- if [ -x .travis/after_success_${TARGET}.sh ]; then .travis/after_success_${TARGET}.sh; fi;
37
-
Original file line number Diff line number Diff line change 6
6
7
7
* todo...
8
8
9
+ v0.3.0
10
+ ------
11
+
12
+ * Updated to PHPStan 0.12
13
+ * Added testing on PHP 7.4
14
+
9
15
v0.2.0
10
16
------
11
17
Original file line number Diff line number Diff line change @@ -36,14 +36,17 @@ parameters:
36
36
# enable detection of echo
37
37
-
38
38
type: Stmt_Echo
39
+ functions: null
39
40
40
41
# enable detection of eval
41
42
-
42
43
type: Expr_Eval
44
+ functions: null
43
45
44
46
# enable detection of die/exit
45
47
-
46
48
type: Expr_Exit
49
+ functions: null
47
50
48
51
# enable detection of a set of functions
49
52
-
Original file line number Diff line number Diff line change 17
17
],
18
18
"require" : {
19
19
"php" : " ^7.1" ,
20
- "phpstan/phpstan" : " ^0.11 "
20
+ "phpstan/phpstan" : " ^0.12 "
21
21
},
22
22
"require-dev" : {
23
23
"friendsofphp/php-cs-fixer" : " ^2.12" ,
24
24
"localheinz/composer-normalize" : " ^1.3" ,
25
- "phpstan/phpstan-phpunit" : " ^0.11 " ,
25
+ "phpstan/phpstan-phpunit" : " ^0.12 " ,
26
26
"phpunit/phpunit" : " ^7.2" ,
27
27
"sensiolabs/security-checker" : " ^5.0" ,
28
28
"symfony/var-dumper" : " ^4.3"
Original file line number Diff line number Diff line change
1
+ parametersSchema :
2
+ banned_code : structure ([
3
+ nodes : listOf (structure ([
4
+ type : string ()
5
+ functions : schema (listOf (string ()), nullable ())
6
+ ]))
7
+ use_from_tests : bool ()
8
+ ])
9
+
1
10
parameters :
2
11
banned_code :
3
12
nodes :
4
13
# enable detection of echo
5
14
-
6
15
type : Stmt_Echo
16
+ functions : null
7
17
8
18
# enable detection of eval
9
19
-
10
20
type : Expr_Eval
21
+ functions : null
11
22
12
23
# enable detection of die/exit
13
24
-
14
25
type : Expr_Exit
26
+ functions : null
15
27
16
28
# enable detection of a set of functions
17
29
-
Original file line number Diff line number Diff line change
1
+ parameters:
2
+ checkGenericClassInNonGenericObjectType: false
3
+
1
4
includes:
2
5
- extension.neon
3
6
- vendor/phpstan/phpstan-phpunit/extension.neon
Original file line number Diff line number Diff line change 26
26
class BannedNodesRule implements Rule
27
27
{
28
28
/**
29
- * @var array
29
+ * @var array<array<string, string[]>>
30
30
*/
31
31
private $ bannedNodes ;
32
32
33
33
/**
34
- * @param array $bannedNodes
34
+ * @param array<array<string, string|string[]>> $bannedNodes
35
35
*/
36
36
public function __construct (array $ bannedNodes )
37
37
{
Original file line number Diff line number Diff line change @@ -120,15 +120,15 @@ public function testProcessNodeWithHandledTypes(Expr $node): void
120
120
}
121
121
122
122
/**
123
- * @return \Generator
123
+ * @return \Generator<array<Include_>>
124
124
*/
125
125
public function getUnhandledNodes (): \Generator
126
126
{
127
127
yield [new Include_ ($ this ->createMock (Expr::class), Include_::TYPE_INCLUDE )];
128
128
}
129
129
130
130
/**
131
- * @return \Generator
131
+ * @return \Generator<array<Eval_|Exit_>>
132
132
*/
133
133
public function getHandledNodes (): \Generator
134
134
{
You can’t perform that action at this time.
0 commit comments