Returns the part of the KSS Comment Block that contains the modifiers

@return string
505776
protected function getModifiersComment()
    {
        $modifiersComment = null;

        foreach ($this->getCommentSections() as $commentSection) {
            // Assume that the modifiers section starts with either a class or a
            // pseudo class
            if (preg_match('/^\s*(?:\.|:)/', $commentSection)) {
                $modifiersComment = $commentSection;
                break;
            }
        }

        return $modifiersComment;
    }
134970
protected function getParametersComment()
    {
        $parametersComment = null;

        foreach ($this->getCommentSections() as $commentSection) {
            // Assume that the parameters section starts with $,%,@
            if (preg_match('/^\s*(\$|@|%)/', $commentSection)) {
                $parametersComment = $commentSection;
                break;
            }
        }

        return $parametersComment;
    }
705318
public static function getModifiedSinceHeader()
    {
        $modifiedSince = '';
        if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
            $modifiedSince = $_SERVER['HTTP_IF_MODIFIED_SINCE'];

            // strip any trailing data appended to header
            if (false !== ($semicolonPos = strpos($modifiedSince, ';'))) {
                $modifiedSince = substr($modifiedSince, 0, $semicolonPos);
            }
        }
        return $modifiedSince;
    }
1229518
public function getFullIsoDescription()
    {
        $region = $this->getRegionName();
        $variant = $this->getVariantName();

        return $this->getFullIsoName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : '');
    }
921033
public function getComment()
    {
        if (!$this->_commentFetched) {
            $this->_comment = $this->_fetchComment();
            $this->_commentFetched = true;
        }
        return $this->_comment;
    }
696099
private function getEditorSnippetsAndClasses()
    {
        $obj = new stdClass();
        $obj->snippets = [];
        $u = new User();
        if ($u->isRegistered()) {
            $snippets = \Concrete\Core\Editor\Snippet::getActiveList();
            foreach ($snippets as $sns) {
                $menu = new stdClass();
                $menu->scsHandle = $sns->getSystemContentEditorSnippetHandle();
                $menu->scsName = $sns->getSystemContentEditorSnippetName();
                $obj->snippets[] = $menu;
            }
        }
        $c = Page::getCurrentPage();
        $obj->classes = [];
        if (is_object($c) && !$c->isError()) {
            $cp = new Permissions($c);
            if ($cp->canViewPage()) {
                $pt = $c->getCollectionThemeObject();
                if (is_object($pt)) {
                    if ($pt->getThemeHandle()) {
                        $obj->classes = $pt->getThemeEditorClasses();
                    } else {
                        $siteTheme = $pt::getSiteTheme();
                        if (is_object($siteTheme)) {
                            $obj->classes = $siteTheme->getThemeEditorClasses();
                        }
                    }
                }
            }
        } else {
            $siteTheme = PageTheme::getSiteTheme();
            if (is_object($siteTheme)) {
                $obj->classes = $siteTheme->getThemeEditorClasses();
            }
        }

        return $obj;
    }
802730
protected function getTokenSplitPattern()
    {
        $sChars = implode('|', $this->getAllTokenSeparators());
        $mimePartPattern = MimeLiteralPart::MIME_PART_PATTERN;
        return '~(' . $mimePartPattern . '|\\\\.|' . $sChars . ')~';
    }
1343187
private function validateDescriptions(): self
    {
        $commentPoss = TokenHelper::findNextAll(
            $this->file->getBaseFile(),
            [T_DOC_COMMENT_STRING, T_DOC_COMMENT_TAG],
            $this->getDocCommentPos(),
            $this->getDocHelper()->getBlockEndPosition()
        );

        foreach ($commentPoss as $index => $commentPos) {
            $commentToken = $this->tokens[$commentPos];
            $skipNewLineCheck = false;

            // We only search till the tags.
            if ($commentToken['code'] === T_DOC_COMMENT_TAG) {
                break;
            }

            if ($isFirstDocString = $index === 0) {
                $skipNewLineCheck = !$this->validateOneLineSummary();
            }

            $this->validateUCFirstDocComment($commentPos, $commentToken);

            if (!$skipNewLineCheck) {
                $this->validateNewLineAfterDocComment($commentPos, $commentToken, $isFirstDocString);
            }
        }

        return $this;

        ;
    }
1261284
public function getLeadingCommentAndWhitespaceText() : string {
        // TODO re-tokenize comments and whitespace
        $fileContents = $this->getFileContents();
        foreach ($this->getDescendantTokens() as $token) {
            return $token->getLeadingCommentsAndWhitespaceText($fileContents);
        }
    }
1048863
private function getCommentDescriptionStartPointer(): int
    {
        $commentStartToken = $this->docHelper->getBlockStartToken();
        $commentEndPtr = $this->docHelper->getBlockEndPosition();

        $summaryPtr = $this->summaryHelper->getCommentSummaryPosition();

        //If no tags the possible end of search is the closing tag of the doc comment.
        if (count($commentStartToken['comment_tags']) === 0) {
            return $this->file->findNext(
                [T_DOC_COMMENT_STRING],
                $summaryPtr + 1,
                $commentEndPtr
            );
        }

        //else its the pointer of the first comment tag found.
        $firstTagPtr = array_shift($commentStartToken['comment_tags']);

        return $this->file->findNext(
            [T_DOC_COMMENT_STRING],
            $summaryPtr + 1,
            $firstTagPtr - 1
        );
    }
57830
private function getSplitOffset()
    {
        $blocks = (int) $this->range->getLength() / $this->index->getKeyReader()->getReadLength();
        $centerBlock = (int) $blocks / 2;
        return $this->range->getOffset() + $centerBlock * $this->index->getKeyReader()->getReadLength();
    }
923027
public function getCommentForm()
    {
        $postId = $_POST['postId'] ?? null;
        $commentId = $_POST['commentId'] ?? null;

        if (!$commentId || !$postId || !$comment = get_comment($commentId)) {
            wp_send_json_error('Missing variables');
        }

        if (!$comment = get_comment($commentId)) {
            wp_send_json_error('Comment is missing');
        }

        $args = array(
            'id_form' => 'commentupdate',
            'class_submit' => 'btn btn-sm btn-primary',
            'title_reply' => '',
            'title_reply_before' => '',
            'title_reply_after' => '',
            'label_submit' => __('Update', 'municipio'),
            'logged_in_as' => '',
            'comment_field' => '<textarea id="update-comment" name="comment" cols="45" rows="8" aria-required="true">' . $comment->comment_content . '</textarea>',
            'comment_notes_after' => '<input type="hidden" name="commentId" value="' . $commentId . '">
            <input type="hidden" name="nonce" value="' . wp_create_nonce("update-comment_$commentId") . '">',
            'submit_button' => '<input name="%1$s" type="submit" id="%2$s" class="%3$s" value="%4$s" /> <a href="#" class="cancel-update-comment gutter gutter-left gutter-sm"><small>' . __('Cancel', 'municipio') . '</small></a>'
        );

        ob_start();
        comment_form($args, $postId);
        $form = ob_get_clean();
        $form = str_replace('class="comment-respond"', 'class="comment-respond comment-respond-new comment-update"', $form);
        $form = str_replace('id="respond"', 'id="respond-edit"', $form);

        wp_send_json_success($form);
    }
889488
public function getMsgBody()
    {
        $body = null;

        if (!empty($this->_parts)) {
            if (count($this->_parts) > 1) {
                foreach ($this->_parts as $part) {
                    if ($part->contentType != Content::CT_TEXT_PLAIN && $this->getHeaders()->getMessageContentType() == Content::CT_MULTIPART_ALTERNATIVE) {
                        $body = $part->getContentDecode();
                        break;
                    }

                    $body .= PHP_EOL.$part->getContentDecode();
                }
            } else {
                $body = $this->_parts[0]->getContentDecode();
            }
        }

        return $body;
    }
1222493
private function namespaceBlock() {
    $node = new StatementBlockNode();
    $this->matchHidden($node);
    while ($this->currentType !== NULL) {
      if ($this->currentType === T_NAMESPACE && !$this->isLookAhead(T_NS_SEPARATOR)) {
        break;
      }
      $node->addChild($this->topStatement());
      $this->matchHidden($node);
    }
    $this->matchHidden($node);
    return $node;
  }
917389
public static function parseDocCommentDetail($block)
    {
        $comment = strtr(trim(preg_replace('/^\s*\**( |\t)?/m', '', trim($block, '/'))), "\r", '');
        if (preg_match('/^\s*@\w+/m', $comment, $matches, PREG_OFFSET_CAPTURE)) {
            $comment = trim(substr($comment, 0, $matches[0][1]));
        }

        if (empty($comment)) {
            return '';
        }

        $summary = self::parseDocCommentSummary($block);
        $pos = strpos($comment, $summary);
        if ($pos !== false) {
            $comment = trim(substr_replace($comment, '', $pos, strlen($summary)));
        }

        return $comment;
    }
84646
protected function stripComments()
    {
        // PHP only supports $this inside anonymous functions since 5.4
        $minifier = $this;
        $callback = function ($match) use ($minifier) {
            $count = count($minifier->extracted);
            $placeholder = '/*'.$count.'*/';
            $minifier->extracted[$placeholder] = $match[0];

            return $placeholder;
        };
        // multi-line comments
        $this->registerPattern('/\n?\/\*(!|.*?@license|.*?@preserve).*?\*\/\n?/s', $callback);
        $this->registerPattern('/\/\*.*?\*\//s', '');

        // single-line comments
        $this->registerPattern('/\/\/.*$/m', '');
    }
462237
public function getCommentRegexSet()
    {
        return array(
            self::REGEX_COMMENT_SINGLE_LINE,
            self::REGEX_COMMENT_MULTILINE_START,
            self::REGEX_COMMENT_MULTILINE_CONT,
            self::REGEX_COMMENT_MULTILINE_END,
            self::REGEX_COMMENT_MULTILINE_ONE_LINER,
        );
    }