| Total Complexity | 7 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class EntityReflectionEntry |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @param ReflectionClass<object> $reflectionClass |
||
| 13 | */ |
||
| 14 | 1 | public function __construct( |
|
| 15 | private readonly string $className, |
||
| 16 | private readonly ReflectionClass $reflectionClass |
||
| 17 | 1 | ) {} |
|
| 18 | |||
| 19 | 1 | public function getClassName(): string |
|
| 22 | } |
||
| 23 | |||
| 24 | 1 | public function getShortName(): string |
|
| 25 | { |
||
| 26 | 1 | return $this->reflectionClass->getShortName(); |
|
| 27 | } |
||
| 28 | |||
| 29 | 1 | public function hasTruncationAttribute(): bool |
|
| 30 | { |
||
| 31 | 1 | return $this->getTruncateAttribute() !== null; |
|
| 32 | } |
||
| 33 | |||
| 34 | 1 | public function getPriority(): int |
|
| 35 | { |
||
| 36 | 1 | return $this->getTruncateAttribute()?->newInstance()->priority ?? 0; |
|
| 37 | } |
||
| 38 | |||
| 39 | /** @return ReflectionAttribute<TruncateOnGameReset> */ |
||
| 40 | 1 | private function getTruncateAttribute(): ?ReflectionAttribute |
|
| 45 | } |
||
| 46 | } |
||
| 47 |