Nelmio\Alice\FixtureBuilder\Denormalizer\FlagParser\ChainableFlagParserInterface::canParse PHP Method

canParse() public method

Checks if can parse element.
public canParse ( string $element ) : boolean
$element string
return boolean
    public function canParse(string $element) : bool;

Usage Example

Example #1
0
 public function assertCannotParse(string $element)
 {
     if ($this->parser instanceof ChainableFlagParserInterface) {
         $actual = $this->parser->canParse($element);
         $this->assertFalse($actual);
         return;
     }
     try {
         $this->parser->parse($element);
         $this->fail('Expected exception to be thrown.');
     } catch (\LogicException $exception) {
         // expected
     }
 }
ChainableFlagParserInterface