| Conditions | 3 |
| Paths | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function getDocumentFieldValue($entity) |
||
| 16 | { |
||
| 17 | $value = $this->getEntityFieldValue($entity); |
||
| 18 | if (!empty($value) && !is_numeric($value)) { |
||
| 19 | throw new InvalidFieldValueException( |
||
| 20 | sprintf( |
||
| 21 | '"%s" field value of "%s" must be a numeric', |
||
| 22 | $this->getEntityFieldName(), |
||
| 23 | get_class($entity) |
||
| 24 | ) |
||
| 25 | ); |
||
| 26 | } |
||
| 27 | |||
| 28 | return $this->castValue($value); |
||
| 29 | } |
||
| 32 | } |