| Conditions | 6 |
| Paths | 9 |
| Total Lines | 29 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function hashToFieldValue($fieldValue, array $context = array()) |
||
| 27 | { |
||
| 28 | $altText = ''; |
||
| 29 | |||
| 30 | if ($fieldValue === null) { |
||
| 31 | return new Value(); |
||
| 32 | } |
||
| 33 | if (isset($fieldValue['alt_text'])) { |
||
| 34 | $altText = $fieldValue['alt_text']; |
||
| 35 | } |
||
| 36 | |||
| 37 | if (is_array($fieldValue) && array_key_exists('destinationContentId', $fieldValue)) { |
||
| 38 | // fromHash format |
||
| 39 | $id = $fieldValue['destinationContentId']; |
||
| 40 | } else { |
||
| 41 | // simplified format |
||
| 42 | $id = $fieldValue; |
||
| 43 | } |
||
| 44 | |||
| 45 | if ($id === null) { |
||
| 46 | return new Value(); |
||
| 47 | } |
||
| 48 | |||
| 49 | // 1. resolve relations |
||
| 50 | $id = $this->referenceResolver->resolveReference($id); |
||
| 51 | // 2. resolve remote ids |
||
| 52 | $id = $this->contentMatcher->matchOneByKey($id)->id; |
||
| 53 | |||
| 54 | return new Value($id, $altText); |
||
| 55 | } |
||
| 56 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths