PHP 8.3.31
Preview: TemplateLoader.php Size: 975 B
//home/getspomw/itechservicellc.com/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/TemplateLoader.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\Framework\MockObject\Generator;

use SebastianBergmann\Template\Template;

/**
 * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
 *
 * @internal This trait is not covered by the backward compatibility promise for PHPUnit
 */
trait TemplateLoader
{
    /**
     * @var array<string,Template>
     */
    private static array $templates = [];

    private function loadTemplate(string $template): Template
    {
        $filename = __DIR__ . '/templates/' . $template;

        if (!isset(self::$templates[$filename])) {
            self::$templates[$filename] = new Template($filename);
        }

        return self::$templates[$filename];
    }
}

Directory Contents

Dirs: 2 × Files: 9

Name Size Perms Modified Actions
Exception DIR
- drwxr-xr-x 2025-11-18 19:24:06
Edit Download
templates DIR
- drwxr-xr-x 2025-11-18 19:24:06
Edit Download
40.50 KB lrw-r--r-- 2025-10-28 20:23:18
Edit Download
1.30 KB lrw-r--r-- 2025-10-28 20:23:18
Edit Download
2.12 KB lrw-r--r-- 2025-10-28 20:23:18
Edit Download
1.67 KB lrw-r--r-- 2025-10-28 20:23:18
Edit Download
11.71 KB lrw-r--r-- 2025-10-28 20:23:18
Edit Download
1.16 KB lrw-r--r-- 2025-10-28 20:23:18
Edit Download
1.18 KB lrw-r--r-- 2025-10-28 20:23:18
Edit Download
616 B lrw-r--r-- 2025-10-28 20:23:18
Edit Download
975 B lrw-r--r-- 2025-10-28 20:23:18
Edit Download

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