Phpro\SoapClient\CodeGenerator\Rules\PropertynameMatchesRule::appliesToContext PHP Method

appliesToContext() public method

public appliesToContext ( Phpro\SoapClient\CodeGenerator\Context\ContextInterface $context ) : boolean
$context Phpro\SoapClient\CodeGenerator\Context\ContextInterface
return boolean
    public function appliesToContext(ContextInterface $context)
    {
        if (!$context instanceof PropertyContext) {
            return false;
        }
        $property = $context->getProperty();
        if (!preg_match($this->regex, $property->getName())) {
            return false;
        }
        return $this->subRule->appliesToContext($context);
    }