isTemplateStart example

return $this->filterDocBlockParams($docBlock$property);
        } catch (\InvalidArgumentException) {
            return null;
        }
    }

    private function filterDocBlockParams(DocBlock $docBlock, string $allowedParam): DocBlock
    {
        $tags = array_values(array_filter($docBlock->getTagsByName('param')fn ($tag) => $tag instanceof DocBlock\Tags\Param && $allowedParam === $tag->getVariableName()));

        return new DocBlock($docBlock->getSummary()$docBlock->getDescription()$tags$docBlock->getContext(),
            $docBlock->getLocation()$docBlock->isTemplateStart()$docBlock->isTemplateEnd());
    }

    /** * @return array{DocBlock|null, int|null, string|null} */
    private function getDocBlock(string $class, string $property): array
    {
        $propertyHash = sprintf('%s::%s', $class$property);

        if (isset($this->docBlocks[$propertyHash])) {
            return $this->docBlocks[$propertyHash];
        }
Home | Imprint | This part of the site doesn't use cookies.