public static function notValidParameter($parameterName, array $allowedValues, $actualValue)
    {
        return new static(
            sprintf(
                'Parameter: "%s" can only be one of: "%s" Received: "%s"',
                $parameterName,
                static::stringify($allowedValues),
                static::stringify($actualValue)
            )
        );
    }
public static function notValidParameter($parameterName, array $allowedValues, $actualValue)
    {
        return new static(
            sprintf(
                'Parameter: "%s" can only be one of: "%s" Received: "%s"',
                $parameterName,
                static::stringify($allowedValues),
                static::stringify($actualValue)
            )
        );
    }
public static function notValidParameter ( $ parameterName , array $ allowedValues , $ actualValue ) { return new static ( sprintf ( 'Parameter: "%s" can only be one of: "%s" Received: "%s"' , $ parameterName , static :: stringify ( $ allowedValues ) , static :: stringify ( $ actualValue ) ) ) ; }
Static constructor to create from when a parameter should be one of a set of allowed values, but was not.

@param string $parameterName
@param mixed[] $allowedValues
@param mixed $actualValue
@return static
Static constructor to create from when a parameter should be one of a set of allowed values but was not .