Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php namespace jlourenco\base\Models; |
||
26 | public function options() |
||
27 | { |
||
28 | $str = explode("* ", $this->description); |
||
|
|||
29 | $choices = array(); |
||
30 | |||
31 | foreach($str as $st) |
||
32 | { |
||
33 | preg_match('/(?P<digit>\d+) - (?P<name>\w+)/', $st, $matches); |
||
34 | if (sizeof($matches) > 0) { |
||
35 | $st = str_replace("*/","",$st); |
||
36 | $st = str_replace("/*","",$st); |
||
37 | $choices[$matches[1]] = explode($matches[1] . ' - ', $st)[1]; |
||
38 | } |
||
39 | } |
||
40 | |||
41 | return $choices; |
||
42 | } |
||
43 | |||
45 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.