| Conditions | 5 |
| Paths | 7 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function getValue($object) |
||
| 32 | { |
||
| 33 | $objectClassName = get_class($object); |
||
| 34 | foreach ($this->discriminatorMapping as $value => $className) { |
||
| 35 | if ($objectClassName === $className) { |
||
| 36 | return $value; |
||
| 37 | } |
||
| 38 | } |
||
| 39 | foreach ($this->discriminatorMapping as $value => $className) { |
||
| 40 | if (is_a($objectClassName, $className)) { |
||
| 41 | return $value; |
||
| 42 | } |
||
| 43 | } |
||
| 44 | return null; |
||
| 45 | } |
||
| 57 |