src/Standards/BestIt/Sniffs/DocTags/TagSortingSniff.php
private function checkAndRegisterSortingError(): void
    {
        $orgTokens = $this->getTagTokens();
        $sortedTokens = $this->sortTokens($orgTokens);

        if (array_values($orgTokens) !== $sortedTokens) {
            $error = (new CodeWarning(
                static::CODE_WRONG_TAG_SORTING,
                self::MESSAGE_WRONG_TAG_SORTING,
                array_shift($orgTokens)['pointer']
            ))->setToken($this->token);

            $error->isFixable(true);

            throw $error;
        }
    }
private function checkAndRegisterSortingError(): void
    {
        $orgTokens = $this->getTagTokens();
        $sortedTokens = $this->sortTokens($orgTokens);

        if (array_values($orgTokens) !== $sortedTokens) {
            $error = (new CodeWarning(
                static::CODE_WRONG_TAG_SORTING,
                self::MESSAGE_WRONG_TAG_SORTING,
                array_shift($orgTokens)['pointer']
            ))->setToken($this->token);

            $error->isFixable(true);

            throw $error;
        }
    }
private function checkAndRegisterSortingError ( ) : void { $ orgTokens = $ this -> getTagTokens ( ) ; $ sortedTokens = $ this -> sortTokens ( $ orgTokens ) ; if ( array_values ( $ orgTokens ) !== $ sortedTokens ) { $ error = ( new CodeWarning ( static :: CODE_WRONG_TAG_SORTING , self :: MESSAGE_WRONG_TAG_SORTING , array_shift ( $ orgTokens ) [ 'pointer' ] ) ) -> setToken ( $ this -> token ) ; $ error -> isFixable ( true ) ; throw $ error ; } }
Checks the alphabetic sorting and registers and error if it sorted wrongly.

@throws CodeWarning If the tags are not correctly sorted.

@return void
Checks the alphabetic sorting and registers and error if it sorted wrongly .