forked from phpstan/phpstan-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathThrowingSourceLocator.php
More file actions
25 lines (19 loc) · 861 Bytes
/
Copy pathThrowingSourceLocator.php
File metadata and controls
25 lines (19 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php declare(strict_types = 1);
namespace E2EFixture;
use LogicException;
use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
final class ThrowingSourceLocator implements SourceLocator
{
public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?Reflection
{
throw new LogicException('SourceLocator::locateIdentifier must not be called during result cache construction');
}
public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType): array
{
throw new LogicException('SourceLocator::locateIdentifiersByType must not be called during result cache construction');
}
}