Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\SpecificationBagDenormalizer\Calls\OptionalCallsDenormalizer::handleMethodFlags PHP Method

handleMethodFlags() private method

private handleMethodFlags ( Nelmio\Alice\Definition\MethodCallInterface $methodCall, FlagBag $flags ) : Nelmio\Alice\Definition\MethodCallInterface
$methodCall Nelmio\Alice\Definition\MethodCallInterface
$flags Nelmio\Alice\Definition\FlagBag
return Nelmio\Alice\Definition\MethodCallInterface
    private function handleMethodFlags(MethodCallInterface $methodCall, FlagBag $flags) : MethodCallInterface
    {
        foreach ($flags as $flag) {
            if ($flag instanceof OptionalFlag) {
                return new OptionalMethodCall($methodCall, $flag);
            }
        }
        return $methodCall;
    }