src/ArrayArgumentTypeErrorMessage.php
private function tpl(): string
    {
        if (interface_exists($this->type)) {
            return self::$testing
                ? 'Argument %s passed to x must be an array of objects implementing interface %s, %s given for key %s'
                : 'Argument %s passed to %s must be an array of objects implementing interface %s, %s given for key %s, called in %s on line %s';
        }

        if (class_exists($this->type)) {
            return self::$testing
                ? 'Argument %s passed to x must be an array of %s instances, %s given for key %s'
                : 'Argument %s passed to %s must be an array of %s instances, %s given for key %s, called in %s on line %s';
        }

        return self::$testing
            ? 'Argument %s passed to x must be an array of %s values, %s given for key %s'
            : 'Argument %s passed to %s must be an array of %s values, %s given for key %s, called in %s on line %s';
    }
private function tpl(): string
    {
        if (interface_exists($this->type)) {
            return self::$testing
                ? 'Argument %s passed to x must be an array of objects implementing interface %s, %s given for key %s'
                : 'Argument %s passed to %s must be an array of objects implementing interface %s, %s given for key %s, called in %s on line %s';
        }

        if (class_exists($this->type)) {
            return self::$testing
                ? 'Argument %s passed to x must be an array of %s instances, %s given for key %s'
                : 'Argument %s passed to %s must be an array of %s instances, %s given for key %s, called in %s on line %s';
        }

        return self::$testing
            ? 'Argument %s passed to x must be an array of %s values, %s given for key %s'
            : 'Argument %s passed to %s must be an array of %s values, %s given for key %s, called in %s on line %s';
    }
private function tpl ( ) : string { if ( interface_exists ( $ this -> type ) ) { return self :: $ testing ? 'Argument %s passed to x must be an array of objects implementing interface %s, %s given for key %s' : 'Argument %s passed to %s must be an array of objects implementing interface %s, %s given for key %s, called in %s on line %s' ; } if ( class_exists ( $ this -> type ) ) { return self :: $ testing ? 'Argument %s passed to x must be an array of %s instances, %s given for key %s' : 'Argument %s passed to %s must be an array of %s instances, %s given for key %s, called in %s on line %s' ; } return self :: $ testing ? 'Argument %s passed to x must be an array of %s values, %s given for key %s' : 'Argument %s passed to %s must be an array of %s values, %s given for key %s, called in %s on line %s' ; }
Return the template of the error message accoring to the expected type
and the testing mode.

@return string
Return the template of the error message accoring to the expected type and the testing mode .