| Conditions | 7 |
| Paths | 13 |
| Total Lines | 23 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function convertToLocal(?Carbon $date, $format = null, $format_timezone = false, $enableTranslation = null) : string |
||
| 16 | { |
||
| 17 | if (is_null($date)) { |
||
| 18 | return __('Empty'); |
||
| 19 | } |
||
| 20 | |||
| 21 | $timezone = (auth()->user()->timezone) ?? config('app.timezone'); |
||
| 22 | |||
| 23 | $enableTranslation = $enableTranslation !== null ? $enableTranslation : config('timezone.enableTranslation'); |
||
| 24 | |||
| 25 | $date->setTimezone($timezone); |
||
| 26 | |||
| 27 | if (is_null($format)) { |
||
| 28 | return $enableTranslation ? $date->translatedFormat(config('timezone.format')) : $date->format(config('timezone.format')); |
||
| 29 | } |
||
| 30 | |||
| 31 | $formatted_date_time = $enableTranslation ? $date->translatedFormat($format) : $date->format($format); |
||
| 32 | |||
| 33 | if ($format_timezone) { |
||
| 34 | return $formatted_date_time . ' ' . $this->formatTimezone($date); |
||
| 35 | } |
||
| 36 | |||
| 37 | return $formatted_date_time; |
||
| 38 | } |
||
| 65 |
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