| Total Complexity | 7 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | trait ResizableTrait |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * This will return all the objects from resizable properties |
||
| 14 | * |
||
| 15 | * @param null $property |
||
| 16 | * |
||
| 17 | * @return array |
||
| 18 | */ |
||
| 19 | public function getResizableObjects($property = null) : array |
||
| 20 | { |
||
| 21 | $objects = []; |
||
| 22 | |||
| 23 | foreach ($this::RESIZEABLES as $resizable) { |
||
| 24 | if (!property_exists($this, $resizable)) { |
||
| 25 | continue; |
||
| 26 | } |
||
| 27 | |||
| 28 | $collectionOrEntity = $this->{$resizable}; |
||
| 29 | |||
| 30 | if ($collectionOrEntity instanceof Collection) { |
||
| 31 | $objects = array_merge($objects, $collectionOrEntity->getValues()); |
||
| 32 | } |
||
| 33 | |||
| 34 | if ($collectionOrEntity instanceof AbstractFile) { |
||
| 35 | $objects = array_merge($objects, [$collectionOrEntity]); |
||
| 36 | } |
||
| 37 | } |
||
| 38 | |||
| 39 | return $objects; |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * This function will return the properties that are resizable. |
||
| 44 | * |
||
| 45 | * @return array |
||
| 46 | */ |
||
| 47 | public function getResizables(): array |
||
| 48 | { |
||
| 49 | return self::RESIZEABLES; |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * This function will return the sizes that are accepted by the resize service. |
||
| 54 | * |
||
| 55 | * @return array |
||
| 56 | */ |
||
| 57 | public function getSizes(): array |
||
| 60 | } |
||
| 61 | } |
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