PHP 8.2.30
Preview: Registry.php Size: 1.02 KB
/home/byroehnu/easetack.com/vendor/phpunit/phpunit/src/Metadata/Parser/Registry.php

<?php declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Metadata\Parser;

/**
 * Attribute and annotation information is static within a single PHP process.
 * It is therefore okay to use a Singleton registry here.
 *
 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
 *
 * @internal This class is not covered by the backward compatibility promise for PHPUnit
 */
final class Registry
{
    private static ?Parser $instance = null;

    public static function parser(): Parser
    {
        return self::$instance ?? self::$instance = self::build();
    }

    private static function build(): Parser
    {
        return new CachingParser(
            new ParserChain(
                new AttributeParser,
                new AnnotationParser,
            ),
        );
    }
}

Directory Contents

Dirs: 1 × Files: 6

Name Size Perms Modified Actions
- drwxrwxrwx 2025-05-16 16:14:49
Edit Download
20.39 KB lrw-rw-rw- 2025-04-08 07:59:11
Edit Download
28.12 KB lrw-rw-rw- 2025-04-08 07:59:11
Edit Download
2.64 KB lrw-rw-rw- 2025-04-08 07:59:11
Edit Download
1.05 KB lrw-rw-rw- 2025-04-08 07:59:11
Edit Download
2.15 KB lrw-rw-rw- 2025-04-08 07:59:11
Edit Download
1.02 KB lrw-rw-rw- 2025-04-08 07:59:11
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).