| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | public function handle() |
||
| 47 | { |
||
| 48 | foreach ($this->identifiers as $identifierClass) { |
||
| 49 | $identifier = new $identifierClass($this->queryString); |
||
| 50 | |||
| 51 | if ($identifier->isValid()) { |
||
| 52 | return $this->validIdentifier = $identifier; |
||
|
|
|||
| 53 | } |
||
| 54 | } |
||
| 55 | |||
| 56 | throw new UnknownIdentifierException(); |
||
| 57 | } |
||
| 58 | |||
| 60 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: