コード例 #1
0
ファイル: ProjectAnalyzer.php プロジェクト: eloquent/typhoon
 /**
  * @param MethodDefinition $methodDefinition
  * @param ClassName        $expectedfacadeClassName
  *
  * @return boolean
  */
 protected function methodHasConstructorStaticCall(MethodDefinition $methodDefinition, ClassName $expectedfacadeClassName)
 {
     $this->typeCheck->methodHasConstructorStaticCall(func_get_args());
     $hasCall = false;
     $callPattern = sprintf('/^\\s*%s\\s*::\\s*get\\s*\\(\\s*__CLASS__\\s*,\\s*\\\\?func_get_args\\s*\\(\\s*\\)\\s*\\)\\s*;$/', preg_quote($expectedfacadeClassName->string(), '/'));
     $firstStatement = $this->parseFirstMethodStatement($methodDefinition->source());
     if (preg_match($callPattern, $firstStatement)) {
         $hasCall = true;
     }
     return $hasCall;
 }
コード例 #2
0
 /**
  * @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));
 }