ApiGen\Parser\Reflection\Extractors\AnnotationMethodExtractor::processMagicMethodAnnotation PHP Method

processMagicMethodAnnotation() private method

private processMagicMethodAnnotation ( string $annotation ) : ApiGen\Parser\Reflection\ReflectionMethodMagic[] | array
$annotation string
return ApiGen\Parser\Reflection\ReflectionMethodMagic[] | array
    private function processMagicMethodAnnotation($annotation)
    {
        if (!preg_match(self::PATTERN_METHOD, $annotation, $matches)) {
            return [];
        }
        list(, $static, $returnTypeHint, $returnsReference, $name, $args, $shortDescription) = $matches;
        $startLine = $this->getStartLine($annotation);
        $endLine = $startLine + substr_count($annotation, "\n");
        $methods = [];
        $methods[$name] = $method = $this->reflectionFactory->createMethodMagic(['name' => $name, 'shortDescription' => str_replace("\n", ' ', $shortDescription), 'startLine' => $startLine, 'endLine' => $endLine, 'returnsReference' => $returnsReference === '&', 'declaringClass' => $this->reflectionClass, 'annotations' => ['return' => [0 => $returnTypeHint]], 'static' => $static === 'static']);
        $this->attachMethodParameters($method, $args);
        return $methods;
    }