| Conditions | 4 |
| Paths | 8 |
| Total Lines | 15 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | 10 | public function __construct( |
|
| 19 | public string|CarbonInterface|null $datetime = null, |
||
| 20 | public string|null $timezone = null, |
||
| 21 | public string|null $datetime_format = null, |
||
| 22 | ) { |
||
| 23 | 10 | if (! $this->timezone) { |
|
| 24 | 9 | $this->timezone = config('app.timezone'); |
|
| 25 | } |
||
| 26 | |||
| 27 | 10 | if (! $this->datetime instanceof CarbonInterface) { |
|
| 28 | 7 | $this->datetime = app(Carbon::class)->parse($this->datetime); |
|
| 29 | } |
||
| 30 | |||
| 31 | 10 | if (! $this->datetime_format) { |
|
| 32 | 10 | $this->datetime_format = 'Y-m-d H:i'; |
|
| 33 | } |
||
| 48 |
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.