InvalidTemplateParam
A template argument violates the declared bounds of the type parameter.
Example
Section titled “Example”<?php/** * @template T of Countable * @param T $collection */function count_items($collection): int { return count($collection);}
count_items('hello'); // string does not satisfy Countable boundHow to fix
Section titled “How to fix”Pass a value that satisfies the template bound, or loosen the bound if appropriate.