| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) { |
||
| 25 | if (empty($items->get($delta)->getValue()['target_id'])) { |
||
| 26 | $element['#markup'] = '<div class="label">' . $element['#title'] . '</div>'; |
||
| 27 | $element['#markup'] .= '<div>' . $this->t('Value creation for this field is disabled.') . '</div>'; |
||
| 28 | return $element; |
||
| 29 | } |
||
| 30 | |||
| 31 | $target = $this->entityTypeManager->getStorage($this->targetEntityType)->load($items->get($delta)->getValue()['target_id']); |
||
| 32 | if (!$target) { |
||
| 33 | $element['#markup'] = '<div class="label">' . $element['#title'] . '</div>'; |
||
| 34 | $element['#markup'] .= '<div>' . $this->t('Removed.') . '</div>'; |
||
| 35 | return $element; |
||
| 36 | } |
||
| 37 | |||
| 38 | $view_builder = $this->entityTypeManager->getViewBuilder($target->getEntityTypeId()); |
||
| 39 | $element['entity'] = $view_builder->view($target, $this->getSetting('display_mode'), $target->language()->getId()); |
||
| 40 | |||
| 41 | return $element; |
||
| 42 | } |
||
| 45 |
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