| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | protected function enter(Node $node) |
||
| 12 | { |
||
| 13 | if($node instanceof Property) |
||
| 14 | { |
||
| 15 | if($node->isPublic()) |
||
| 16 | { |
||
| 17 | foreach($node->props as $property) |
||
| 18 | { |
||
| 19 | $this->dispatch( |
||
| 20 | new \Solidifier\Defects\PublicAttribute($this->currentObjectType, $property->name, $node) |
||
|
|
|||
| 21 | ); |
||
| 22 | } |
||
| 23 | } |
||
| 24 | } |
||
| 25 | } |
||
| 26 | } |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: