/** * @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; }