| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace XoopsModules\Smartobject\Form\Elements; |
||
| 26 | public function __construct($object, $key) |
||
| 27 | { |
||
| 28 | $var = $object->vars[$key]; |
||
| 29 | $timearray = []; |
||
| 30 | for ($i = 0; $i < 24; ++$i) { |
||
| 31 | for ($j = 0; $j < 60; $j += 10) { |
||
| 32 | $key_t = ($i * 3600) + ($j * 60); |
||
| 33 | $timearray[$key_t] = (0 != $j) ? $i . ':' . $j : $i . ':0' . $j; |
||
| 34 | } |
||
| 35 | } |
||
| 36 | ksort($timearray); |
||
| 37 | parent::__construct($var['form_caption'], $key, $object->getVar($key, 'e')); |
||
|
|
|||
| 38 | $this->addOptionArray($timearray); |
||
| 39 | } |
||
| 40 | } |
||
| 41 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.