Nelmio\Alice\Generator\Resolver\Value\Chainable\ListValueResolver::canResolve PHP Method

canResolve() public method

public canResolve ( Nelmio\Alice\Definition\ValueInterface $value ) : boolean
$value Nelmio\Alice\Definition\ValueInterface
return boolean
    public function canResolve(ValueInterface $value) : bool
    {
        return $value instanceof ListValue;
    }

Usage Example

Beispiel #1
0
 public function testCanResolveOptionalValues()
 {
     $resolver = new ListValueResolver();
     $this->assertTrue($resolver->canResolve(new ListValue([])));
     $this->assertFalse($resolver->canResolve(new FakeValue()));
 }