| Conditions | 4 |
| Paths | 8 |
| Total Lines | 15 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 11 | public function __construct( |
|
| 20 | public string|null|CarbonInterface $date = null, |
||
| 21 | public string|null $timezone = null, |
||
| 22 | public string|null $date_format = 'Y-m-d', |
||
| 23 | ) { |
||
| 24 | 11 | if (! $this->timezone) { |
|
| 25 | 9 | $this->timezone = config('app.timezone', 'UTC'); |
|
| 26 | } |
||
| 27 | |||
| 28 | 11 | if (! $this->date) { |
|
| 29 | 2 | $this->date = now(); |
|
| 30 | } |
||
| 31 | |||
| 32 | 11 | if (! $this->date instanceof CarbonInterface) { |
|
| 33 | 6 | $this->date = app(Carbon::class)->parse($this->date); |
|
| 34 | } |
||
| 49 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.