| Conditions | 6 |
| Paths | 8 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | 2 | public function getLocationAttributeValue(): string |
|
| 14 | { |
||
| 15 | 2 | $location = ''; |
|
| 16 | |||
| 17 | 2 | if ($this->hasAttribute(self::ATTRIBUTE_LOCATION)) { |
|
| 18 | 2 | $location = $this->getAttributeValue(self::ATTRIBUTE_LOCATION, true); |
|
| 19 | 2 | } elseif ($this->hasAttribute(self::ATTRIBUTE_SCHEMA_LOCATION)) { |
|
| 20 | 2 | $location = $this->getAttributeValue(self::ATTRIBUTE_SCHEMA_LOCATION, true); |
|
| 21 | 2 | } elseif ($this->hasAttribute(self::ATTRIBUTE_SCHEMA_LOCATION_)) { |
|
| 22 | 2 | $location = $this->getAttributeValue(self::ATTRIBUTE_SCHEMA_LOCATION_, true); |
|
| 23 | } |
||
| 24 | |||
| 25 | 2 | if (!empty($location) && './' === mb_substr($location, 0, 2)) { |
|
|
|
|||
| 26 | 2 | $location = mb_substr($location, 2); |
|
| 27 | } |
||
| 28 | |||
| 29 | 2 | return $location; |
|
| 30 | } |
||
| 32 |