コード例 #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;
 }