| 1: | <?php declare(strict_types = 1); |
| 2: | |
| 3: | namespace PHPStan\Reflection\Deprecation; |
| 4: | |
| 5: | |
| 6: | |
| 7: | |
| 8: | final class Deprecation |
| 9: | { |
| 10: | |
| 11: | private ?string $description = null; |
| 12: | |
| 13: | private function __construct() |
| 14: | { |
| 15: | } |
| 16: | |
| 17: | public static function create(): self |
| 18: | { |
| 19: | return new self(); |
| 20: | } |
| 21: | |
| 22: | public function getDescription(): ?string |
| 23: | { |
| 24: | return $this->description; |
| 25: | } |
| 26: | |
| 27: | public static function createWithDescription(string $description): self |
| 28: | { |
| 29: | $clone = new self(); |
| 30: | $clone->description = $description; |
| 31: | |
| 32: | return $clone; |
| 33: | } |
| 34: | |
| 35: | } |
| 36: | |