| Total Complexity | 8 |
| Total Lines | 69 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class ArrayCollection |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | private $elements; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * ArrayCollection constructor. |
||
| 18 | * |
||
| 19 | * @param array $elements |
||
| 20 | */ |
||
| 21 | public function __construct(array $elements = []) |
||
| 22 | { |
||
| 23 | $this->elements = $elements; |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param $key |
||
| 28 | * |
||
| 29 | * @return mixed|null |
||
| 30 | */ |
||
| 31 | public function remove($key) |
||
| 32 | { |
||
| 33 | if (!isset($this->elements[$key]) && !array_key_exists($key, $this->elements)) { |
||
| 34 | return null; |
||
| 35 | } |
||
| 36 | |||
| 37 | $removed = $this->elements[$key]; |
||
| 38 | unset($this->elements[$key]); |
||
| 39 | |||
| 40 | return $removed; |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param $element |
||
| 45 | * |
||
| 46 | * @return bool |
||
| 47 | */ |
||
| 48 | public function removeElement($element) |
||
| 49 | { |
||
| 50 | $key = array_search($element, $this->elements, true); |
||
| 51 | |||
| 52 | if ($key === false) { |
||
| 53 | return false; |
||
| 54 | } |
||
| 55 | |||
| 56 | unset($this->elements[$key]); |
||
| 57 | |||
| 58 | return true; |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @param $key |
||
| 63 | * |
||
| 64 | * @return mixed|null |
||
| 65 | */ |
||
| 66 | public function get($key) |
||
| 69 | } |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @param $key |
||
| 73 | * @param $value |
||
| 74 | */ |
||
| 75 | public function set($key, $value) |
||
| 78 | } |
||
| 79 | } |
||
| 80 |
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