0 follower

Final Class Yiisoft\Definitions\Helpers\ExceptionHelper

InheritanceYiisoft\Definitions\Helpers\ExceptionHelper

Method Details

Hide inherited methods

incorrectArrayDefinitionConstructorArguments() public static method

public static Yiisoft\Definitions\Exception\InvalidConfigException incorrectArrayDefinitionConstructorArguments ( mixed $value )
$value mixed

                public static function incorrectArrayDefinitionConstructorArguments(mixed $value): InvalidConfigException
{
    return new InvalidConfigException(
        sprintf(
            'Invalid definition: incorrect constructor arguments. Expected array, got %s.',
            get_debug_type($value),
        ),
    );
}

            
incorrectArrayDefinitionMethodArguments() public static method

public static Yiisoft\Definitions\Exception\InvalidConfigException incorrectArrayDefinitionMethodArguments ( string $key, mixed $value )
$key string
$value mixed

                public static function incorrectArrayDefinitionMethodArguments(string $key, mixed $value): InvalidConfigException
{
    return new InvalidConfigException(
        sprintf(
            'Invalid definition: incorrect method "%s" arguments. Expected array, got "%s". ' .
            'Probably you should wrap them into square brackets.',
            $key,
            get_debug_type($value),
        ),
    );
}

            
invalidArrayDefinitionKey() public static method

public static Yiisoft\Definitions\Exception\InvalidConfigException invalidArrayDefinitionKey ( integer|string $key )
$key integer|string

                public static function invalidArrayDefinitionKey(int|string $key): InvalidConfigException
{
    return new InvalidConfigException(
        sprintf(
            'Invalid definition: invalid key in array definition. Only string keys are allowed, got %d.',
            $key,
        ),
    );
}