| Total Complexity | 2 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class Timezone implements CastsAttributes |
||
| 13 | { |
||
| 14 | use TimezoneTrait; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Transform the attribute from the underlying model values. |
||
| 18 | * |
||
| 19 | * @param Model $model |
||
| 20 | * @param string $key |
||
| 21 | * @param mixed $value |
||
| 22 | * @param array $attributes |
||
| 23 | * @return Carbon |
||
| 24 | * @throws Exception |
||
| 25 | */ |
||
| 26 | public function get($model, string $key, $value, array $attributes) |
||
| 27 | { |
||
| 28 | return Carbon::parse($value) |
||
| 29 | ->setTimezone($this->getUserTimezone()); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Transform the attribute to its underlying model values. |
||
| 34 | * |
||
| 35 | * @param Model $model |
||
| 36 | * @param string $key |
||
| 37 | * @param mixed $value |
||
| 38 | * @param array $attributes |
||
| 39 | * @return Carbon |
||
| 40 | */ |
||
| 41 | public function set($model, string $key, $value, array $attributes) |
||
| 44 | } |
||
| 45 | } |
||
| 46 |
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