| Conditions | 3 |
| Paths | 4 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function getPrimary(): string |
||
| 22 | { |
||
| 23 | $class = new ReflectionClass($this->classConstant); |
||
| 24 | $propertyValue = ''; |
||
| 25 | |||
| 26 | if ($class->hasProperty('defaultName')) { |
||
| 27 | $defaultName = new ReflectionProperty($this->classConstant, 'defaultName'); |
||
| 28 | $propertyValue = $defaultName->getValue(); |
||
| 29 | } |
||
| 30 | |||
| 31 | if (!empty($propertyValue)) { |
||
| 32 | return $propertyValue; |
||
| 33 | } |
||
| 34 | |||
| 35 | return $this->getSecondary(); |
||
| 36 | } |
||
| 37 | |||
| 43 |