| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3.0416 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | 14 | private function convertToArray($input): array |
|
| 41 | { |
||
| 42 | 14 | if(! is_array($input)) |
|
| 43 | { |
||
| 44 | 12 | if(! $this->isConvertibleToString($input)) |
|
| 45 | { |
||
| 46 | throw new \InvalidArgumentException("Using argument must be a string (or an array of string)"); |
||
| 47 | } |
||
| 48 | |||
| 49 | 12 | $input = array($input); |
|
| 50 | } |
||
| 51 | |||
| 52 | 14 | return $input; |
|
| 53 | } |
||
| 54 | } |
||
| 55 |
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.