REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 2.64 KB
Close
/home/byroehnu/easetack.com/vendor/phpunit/phpunit/src/Metadata/Parser/CachingParser.php
Text
Base64
<?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; use function assert; use function class_exists; use function method_exists; use PHPUnit\Metadata\MetadataCollection; /** * @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 CachingParser implements Parser { private readonly Parser $reader; /** * @var array<class-string, MetadataCollection> */ private array $classCache = []; /** * @var array<non-empty-string, MetadataCollection> */ private array $methodCache = []; /** * @var array<non-empty-string, MetadataCollection> */ private array $classAndMethodCache = []; public function __construct(Parser $reader) { $this->reader = $reader; } /** * @param class-string $className */ public function forClass(string $className): MetadataCollection { assert(class_exists($className)); if (isset($this->classCache[$className])) { return $this->classCache[$className]; } $this->classCache[$className] = $this->reader->forClass($className); return $this->classCache[$className]; } /** * @param class-string $className * @param non-empty-string $methodName */ public function forMethod(string $className, string $methodName): MetadataCollection { assert(class_exists($className)); assert(method_exists($className, $methodName)); $key = $className . '::' . $methodName; if (isset($this->methodCache[$key])) { return $this->methodCache[$key]; } $this->methodCache[$key] = $this->reader->forMethod($className, $methodName); return $this->methodCache[$key]; } /** * @param class-string $className * @param non-empty-string $methodName */ public function forClassAndMethod(string $className, string $methodName): MetadataCollection { $key = $className . '::' . $methodName; if (isset($this->classAndMethodCache[$key])) { return $this->classAndMethodCache[$key]; } $this->classAndMethodCache[$key] = $this->forClass($className)->mergeWith( $this->forMethod($className, $methodName), ); return $this->classAndMethodCache[$key]; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Annotation
DIR
-
drwxrwxrwx
2025-05-16 16:14:49
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AnnotationParser.php
20.39 KB
lrw-rw-rw-
2025-04-08 07:59:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AttributeParser.php
28.12 KB
lrw-rw-rw-
2025-04-08 07:59:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CachingParser.php
2.64 KB
lrw-rw-rw-
2025-04-08 07:59:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Parser.php
1.05 KB
lrw-rw-rw-
2025-04-08 07:59:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ParserChain.php
2.15 KB
lrw-rw-rw-
2025-04-08 07:59:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Registry.php
1.02 KB
lrw-rw-rw-
2025-04-08 07:59:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).