Skip to content

Commit

Permalink
PHPStan 0.12 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mhujer committed Nov 30, 2019
1 parent 6d67a75 commit db2f4e1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
"autoload-dev": {
"classmap": ["tests/"]
},
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^7.2",
"consistence/consistence": "~2.0",
"phpstan/phpstan": "^0.11"
"phpstan/phpstan": "^0.12"
},
"require-dev": {
"consistence/coding-standard": "3.9",
Expand Down
3 changes: 3 additions & 0 deletions src/Rules/ClassShouldNotUseObjectPrototypeRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
use PHPStan\Analyser\Scope;
use PHPStan\Broker\Broker;

/**
* @implements \PHPStan\Rules\Rule<\PhpParser\Node\Stmt\Class_>
*/
class ClassShouldNotUseObjectPrototypeRule implements \PHPStan\Rules\Rule
{

Expand Down
3 changes: 3 additions & 0 deletions src/Rules/ConsistenceFunctionWrappersAreUsedRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;

/**
* @implements \PHPStan\Rules\Rule<\PhpParser\Node\Expr\FuncCall>
*/
class ConsistenceFunctionWrappersAreUsedRule implements \PHPStan\Rules\Rule
{

Expand Down
3 changes: 3 additions & 0 deletions tests/Rules/ClassShouldNotUseObjectPrototypeRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Mhujer\PHPStanConsistence\Rules;

/**
* @extends \PHPStan\Testing\RuleTestCase<\Mhujer\PHPStanConsistence\Rules\ClassShouldNotUseObjectPrototypeRule>
*/
class ClassShouldNotUseObjectPrototypeRuleTest extends \PHPStan\Testing\RuleTestCase
{

Expand Down
3 changes: 3 additions & 0 deletions tests/Rules/ConsistenceFunctionWrappersAreUsedRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Mhujer\PHPStanConsistence\Rules;

/**
* @extends \PHPStan\Testing\RuleTestCase<\Mhujer\PHPStanConsistence\Rules\ConsistenceFunctionWrappersAreUsedRule>
*/
class ConsistenceFunctionWrappersAreUsedRuleTest extends \PHPStan\Testing\RuleTestCase
{

Expand Down

0 comments on commit db2f4e1

Please sign in to comment.