| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | final class CachedCount |
||
| 10 | { |
||
| 11 | private ?int $count = null; |
||
| 12 | private ?Countable $collection; |
||
| 13 | |||
| 14 | 17 | public function __construct(Countable $collection) |
|
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @psalm-internal Yiisoft\Yii\Cycle\Data\Reader |
||
| 21 | */ |
||
| 22 | 1 | public function getCount(): int |
|
| 23 | { |
||
| 24 | 1 | return $this->count ?? $this->cacheCount(); |
|
| 25 | } |
||
| 26 | |||
| 27 | 1 | private function cacheCount(): int |
|
| 33 | } |
||
| 34 | } |
||
| 35 |
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.