| Total Complexity | 3 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | trait AcceptsCustomFormat |
||
| 8 | { |
||
| 9 | /** @var null|Closure */ |
||
| 10 | protected $format; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @return bool |
||
| 14 | */ |
||
| 15 | public function hasCustomFormat(): bool |
||
| 16 | { |
||
| 17 | return null !== $this->format; |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param Closure $format |
||
| 22 | * |
||
| 23 | * @return self |
||
| 24 | */ |
||
| 25 | public function renderAs(Closure $format): self |
||
| 26 | { |
||
| 27 | $this->format = $format; |
||
| 28 | |||
| 29 | return $this; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param $args |
||
| 34 | * |
||
| 35 | * @return mixed |
||
| 36 | */ |
||
| 37 | protected function callFormatter(...$args) |
||
| 40 | } |
||
| 41 | } |
||
| 42 |
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.