Nelmio\Alice\Throwable\Exception\LogicExceptionFactory::createForUncallableMethod PHP Method

createForUncallableMethod() public static method

public static createForUncallableMethod ( string $method ) : LogicException
$method string
return LogicException
    public static function createForUncallableMethod(string $method) : \LogicException
    {
        return new \LogicException(sprintf('By its nature, "%s()" should not be called.', $method));
    }

Usage Example

Example #1
0
 private function throwException(string $method)
 {
     throw LogicExceptionFactory::createForUncallableMethod($method);
 }