| Total Complexity | 7 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | abstract class AbstractSettingsManager implements SettingsManagerContract |
||
| 9 | { |
||
| 10 | /** @var \Illuminate\Database\Eloquent\Model */ |
||
| 11 | protected $model; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * AbstractSettingsManager constructor. |
||
| 15 | * @param \Illuminate\Database\Eloquent\Model $model |
||
| 16 | */ |
||
| 17 | public function __construct(Model $model) |
||
| 18 | { |
||
| 19 | $this->model = $model; |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @return array |
||
| 24 | */ |
||
| 25 | public function all(): array |
||
| 26 | { |
||
| 27 | if (!is_null($this->model->settings)) { |
||
| 28 | return $this->model->settings; |
||
| 29 | } else { |
||
| 30 | return []; |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param string $path |
||
| 36 | * @return bool |
||
| 37 | */ |
||
| 38 | public function has(string $path): bool |
||
| 39 | { |
||
| 40 | return array_has($this->all(), $path); |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param string|null $path |
||
| 45 | * @param null $default |
||
|
1 ignored issue
–
show
|
|||
| 46 | * @return array|mixed |
||
| 47 | */ |
||
| 48 | public function get(string $path = null, $default = null) |
||
| 49 | { |
||
| 50 | return $path ? array_get($this->all(), $path, $default) : $this->all(); |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param string $path |
||
| 55 | * @param mixed $value |
||
| 56 | * @return \Glorand\Model\Settings\Contracts\SettingsManagerContract |
||
| 57 | */ |
||
| 58 | public function update(string $path, $value): SettingsManagerContract |
||
| 61 | } |
||
| 62 | } |
||
| 63 |
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