protected function methodHasInit(
        MethodDefinition $methodDefinition,
        ClassName $expectedFacadeClassName,
        &$propertyName
    ) {
        $this->typeCheck->methodHasInit(func_get_args());

        $hasInit = false;
        $callPattern = sprintf(
            '/^\s*\$this\s*->\s*(%s)\s*=\s*%s\s*::\s*get\s*\(\s*__CLASS__\s*,\s*\\\\?func_get_args\s*\(\s*\)\s*\)\s*;$/',
            '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*', // PHP variable name
            preg_quote($expectedFacadeClassName->string(), '/')
        );

        $firstStatement = $this->parseFirstMethodStatement($methodDefinition->source());
        if (preg_match($callPattern, $firstStatement, $matches)) {
            $hasInit = true;
            $propertyName = $matches[1];
        }

        return $hasInit;
    }
protected function methodHasInit(
        MethodDefinition $methodDefinition,
        ClassName $expectedFacadeClassName,
        &$propertyName
    ) {
        $this->typeCheck->methodHasInit(func_get_args());

        $hasInit = false;
        $callPattern = sprintf(
            '/^\s*\$this\s*->\s*(%s)\s*=\s*%s\s*::\s*get\s*\(\s*__CLASS__\s*,\s*\\\\?func_get_args\s*\(\s*\)\s*\)\s*;$/',
            '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*', // PHP variable name
            preg_quote($expectedFacadeClassName->string(), '/')
        );

        $firstStatement = $this->parseFirstMethodStatement($methodDefinition->source());
        if (preg_match($callPattern, $firstStatement, $matches)) {
            $hasInit = true;
            $propertyName = $matches[1];
        }

        return $hasInit;
    }
@param MethodDefinition $methodDefinition
@param ClassName        $expectedFacadeClassName
@param string           &$propertyName

@return boolean