Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jun 5, 2020
1 parent 50d2c39 commit 414784c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,9 @@ public function testRule(): void
]);
}

public function testTraitProblem(): void
{
$this->analyse([__DIR__ . '/data/trait-method-problem.php'], []);
}

}
16 changes: 0 additions & 16 deletions tests/PHPStan/Rules/Methods/data/abstract-method.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,3 @@ interface Baz
abstract public function doBar(): void;

}

trait X
{

abstract public static function a(self $b): void;

}

class Y
{

use X;

public static function a(self $b): void {}

}
19 changes: 19 additions & 0 deletions tests/PHPStan/Rules/Methods/data/trait-method-problem.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace TraitProblem;

trait X
{

abstract public static function a(self $b): void;

}

class Y
{

use X;

public static function a(self $b): void {}

}

0 comments on commit 414784c

Please sign in to comment.