| Conditions | 6 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 124 | public function get_value() |
|
| 23 | { |
||
| 24 | 124 | if (!$this->object->id && !$this->set && $this->config['type'] == 'number') { |
|
| 25 | 13 | return; |
|
| 26 | } |
||
| 27 | 124 | $value = $this->object->{$this->config['storage']['location']}; |
|
| 28 | 124 | if ($value === 0) { |
|
| 29 | 70 | $reflector = new midgard_reflection_property($this->object->__mgdschema_class_name__); |
|
| 30 | 70 | if ($reflector->is_link($this->config['storage']['location'])) { |
|
| 31 | 44 | return; |
|
| 32 | } |
||
| 33 | } |
||
| 34 | |||
| 35 | 124 | return $this->cast($value); |
|
| 36 | } |
||
| 66 |