Skip to content

Commit 2a62cce

Browse files
authored
Merge pull request #15 from thecodingmachine/phpstan0.12
Adding PHPStan 0.12 compatibility
2 parents c0bafd9 + d23bd2e commit 2a62cce

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"require": {
1313
"php": "^7.1",
1414
"phpstan/phpstan": "^0.10 | ^0.11 | ^0.12",
15-
"thecodingmachine/safe": "^0.1.11"
15+
"thecodingmachine/safe": "^1.0-beta"
1616
},
1717
"require-dev": {
1818
"phpunit/phpunit": "^7.5.2",

src/Rules/UseSafeFunctionsRule.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
/**
1818
* This rule checks that no superglobals are used in code.
19+
*
20+
* @implements Rule<Node\Expr\FuncCall>
1921
*/
2022
class UseSafeFunctionsRule implements Rule
2123
{

src/Utils/FunctionListLoader.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
class FunctionListLoader
1111
{
12+
/**
13+
* @var string[]
14+
*/
1215
private static $functions;
1316

1417
/**

tests/Rules/CallMethodRuleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ protected function getRule(): Rule
1717
$ruleLevelHelper = new RuleLevelHelper($broker, true, true, true);
1818
return new CallMethodsRule(
1919
$broker,
20-
new FunctionCallParametersCheck($ruleLevelHelper, true, true),
20+
new FunctionCallParametersCheck($ruleLevelHelper, true, true, true, true),
2121
$ruleLevelHelper,
2222
true,
2323
true

0 commit comments

Comments
 (0)