Nelmio\Alice\Throwable\Exception\FixtureBuilder\ExpressionLanguage\ExpressionLanguageExceptionFactory::createForMalformedFunction PHP Method

createForMalformedFunction() public static method

public static createForMalformedFunction ( string $value ) : MalformedFunctionException
$value string
return MalformedFunctionException
    public static function createForMalformedFunction(string $value) : MalformedFunctionException
    {
        return new MalformedFunctionException(sprintf('The value "%s" contains an unclosed function.', $value));
    }

Usage Example

 public function testTestCreateForMalformedFunction()
 {
     $exception = ExpressionLanguageExceptionFactory::createForMalformedFunction('foo');
     $this->assertEquals('The value "foo" contains an unclosed function.', $exception->getMessage());
     $this->assertEquals(0, $exception->getCode());
     $this->assertNull($exception->getPrevious());
 }
All Usage Examples Of Nelmio\Alice\Throwable\Exception\FixtureBuilder\ExpressionLanguage\ExpressionLanguageExceptionFactory::createForMalformedFunction