| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function resolve($flag, $flags = null, $mapping = null) |
||
| 43 | { |
||
| 44 | $resultFlags = 0; |
||
| 45 | $start = 0; |
||
| 46 | |||
| 47 | foreach ([ 'universe', 'group', 'user' ] as $scope) |
||
| 48 | { |
||
| 49 | $this->currentScope = $scope; |
||
|
|
|||
| 50 | $start -= 3; |
||
| 51 | $chunk = substr($flag, $start, 3); |
||
| 52 | $resultFlags |= parent::resolve($chunk, $flags, $mapping); |
||
| 53 | } |
||
| 54 | |||
| 55 | return $resultFlags; |
||
| 56 | } |
||
| 57 | |||
| 76 |
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: