-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d391c8e
commit 5b4cd94
Showing
3 changed files
with
36 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
tests/PHPStan/Rules/DeadCode/data/private-property-trait.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace UnusedPropertyTrait; | ||
|
||
trait FooTrait | ||
{ | ||
|
||
private $prop1; | ||
|
||
private $prop2; | ||
|
||
public function doFoo() | ||
{ | ||
echo $this->prop1; | ||
} | ||
|
||
public function setFoo($prop1) | ||
{ | ||
$this->prop1 = $prop1; | ||
} | ||
|
||
} | ||
|
||
class ClassUsingTrait | ||
{ | ||
|
||
use FooTrait; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters