/** * @param MethodDefinition $methodDefinition * @param ClassName $expectedfacadeClassName * * @return boolean */ protected function methodHasStaticCall(MethodDefinition $methodDefinition, ClassName $expectedfacadeClassName) { $this->typeCheck->methodHasStaticCall(func_get_args()); $hasCall = false; $expectedMethodName = $this->normalizeValidatorMethodName($methodDefinition->name()); $callPattern = sprintf('/^\\s*%s\\s*::\\s*get\\s*\\(\\s*__CLASS__\\s*\\)\\s*->\\s*%s\\s*\\(\\s*\\\\?func_get_args\\s*\\(\\s*\\)\\s*\\)\\s*;$/', preg_quote($expectedfacadeClassName->string(), '/'), preg_quote($expectedMethodName, '/')); $firstStatement = $this->parseFirstMethodStatement($methodDefinition->source()); if (preg_match($callPattern, $firstStatement)) { $hasCall = true; } return $hasCall; }
/** * @param RuntimeConfiguration $configuration * @param ClassDefinition $classDefinition * @param MethodDefinition $methodDefinition * * @return ParameterList */ protected function parameterList(RuntimeConfiguration $configuration, ClassDefinition $classDefinition, MethodDefinition $methodDefinition) { $this->typeCheck->parameterList(func_get_args()); $methodReflector = $methodDefinition->createReflector(); $blockComment = $methodReflector->getDocComment(); if (false === $blockComment) { $parameterList = new ParameterList(); } else { $parameterList = $this->parser()->parseBlockComment($classDefinition->className(), $methodDefinition->name(), $blockComment); } return $this->mergeTool()->merge($configuration, $classDefinition, $methodDefinition, $parameterList->accept($this->classNameResolver($classDefinition)), $this->parser()->parseReflector($methodReflector)); }