HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/local/wp/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/InvalidTokenArray.php
<?php
/**
 * PHPCSUtils, utility functions and classes for PHP_CodeSniffer sniff developers.
 *
 * @package   PHPCSUtils
 * @copyright 2019-2020 PHPCSUtils Contributors
 * @license   https://opensource.org/licenses/LGPL-3.0 LGPL3
 * @link      https://github.com/PHPCSStandards/PHPCSUtils
 */

namespace PHPCSUtils\Exceptions;

use PHPCSUtils\Exceptions\RuntimeException;

/**
 * Exception thrown when an non-existent token array is requested.
 *
 * @since 1.0.0
 */
final class InvalidTokenArray extends RuntimeException
{

    /**
     * Create a new invalid token array exception with a standardized text.
     *
     * @since 1.0.0
     *
     * @param string $name The name of the token array requested.
     *
     * @return \PHPCSUtils\Exceptions\InvalidTokenArray
     */
    public static function create($name)
    {
        $stack = \debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 2);

        return new self(
            \sprintf(
                'Call to undefined method %s::%s()',
                $stack[1]['class'],
                $name
            )
        );
    }
}