Common\Exception\InvalidInitTypeException::withType PHP Method

withType() public static method

public static withType ( $type, $allowedTypes ) : InvalidInitTypeException
$type
$allowedTypes
return InvalidInitTypeException
    public static function withType($type, $allowedTypes)
    {
        return new self('The type "' . $type . '" is not within the allowed types "' . implode('", "', $allowedTypes) . '"');
    }
InvalidInitTypeException