protected function getCmsDocBlockTags(ReflectionMethod $method)
    {
        if ( ! ($docBlock = $method->getDocComment())) {
            return [];
        }

        $factory = DocBlockFactory::createInstance();
        $doc     = $factory->create( $docBlock );

        $tags = $doc->getTagsByName('cms');

        if ( ! $tags || ! count($tags)) {
            return [];
        }

        $cmsTags = [];

        foreach ($tags as $tag) {

            if ( ! method_exists($tag, 'getDescription')) {
                // @codeCoverageIgnoreStart
                continue;
                // @codeCoverageIgnoreEnd
            }

            $description = trim($tag->getDescription());

            if (preg_match('#\s+#', $description)) {
                list($firstWord, $parameters) = preg_split('#\s+#', $description, 2);
            } else {
                $firstWord  = $description;
                $parameters = '';
            }

            $firstWord = strtolower($firstWord);

            if ($firstWord == 'relation') {
                $cmsTags['relation'] = true;
                continue;
            }

            if ($firstWord == 'ignore') {
                $cmsTags['ignore'] = true;
                continue;
            }

            if ($firstWord == 'morph') {
                if ( ! $parameters) continue;

                $models = array_map('trim', explode(',', $parameters));

                if ( ! array_key_exists('morph', $cmsTags)) {
                    $cmsTags['morph'] = [];
                }

                $cmsTags['morph'] = array_merge($cmsTags['morph'], $models);
                $cmsTags['morph'] = array_unique($cmsTags['morph']);
                continue;
            }
        }

        return $cmsTags;
    }