Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks if the class has been defined
<?php class_exists(string $class, bool $autoload = true): bool
<?php     protected function setUpPHPCS()

    {

        if (\class_exists('\PHP_CodeSniffer') === true) {
<?php         }



        try {

            if (\class_exists('\PHP_CodeSniffer\Files\LocalFile')) {


                $config            = new \PHP_CodeSniffer\Config();

                $config->cache     = false;
<?php     public static function initializeConfig()

    {

        if (\class_exists('\PHP_CodeSniffer\Config') === true) {

            self::$config = new \PHP_CodeSniffer\Config();

        }

    }
<?php             return;

        }



        if (\method_exists($this, 'expectException') && \class_exists('PHPUnit\Framework\Error\Warning')) {


            $this->expectException('PHPUnit\Framework\Error\Warning');

            $this->expectExceptionMessage($message);
<?php }




if (class_exists('PHPUnit_Framework_TestCase') === true

    && class_exists('PHPUnit\Framework\TestCase') === false

) {

    class_alias('PHPUnit_Framework_TestCase', 'PHPUnit\Framework\TestCase');
<?php if (class_exists('PHPUnit_Framework_TestCase') === true

    && class_exists('PHPUnit\Framework\TestCase') === false

) {

    class_alias('PHPUnit_Framework_TestCase', 'PHPUnit\Framework\TestCase');

}