| 1: | <?php declare(strict_types = 1); |
| 2: | |
| 3: | namespace PHPStan\Rules\RestrictedUsage; |
| 4: | |
| 5: | /** |
| 6: | * @api |
| 7: | */ |
| 8: | final class RestrictedUsage |
| 9: | { |
| 10: | |
| 11: | private function __construct( |
| 12: | public readonly string $errorMessage, |
| 13: | public readonly string $identifier, |
| 14: | ) |
| 15: | { |
| 16: | } |
| 17: | |
| 18: | public static function create( |
| 19: | string $errorMessage, |
| 20: | string $identifier, |
| 21: | ): self |
| 22: | { |
| 23: | return new self($errorMessage, $identifier); |
| 24: | } |
| 25: | |
| 26: | } |
| 27: |