| Total Complexity | 6 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 8 | class Uuid extends GenericId |
||
| 9 | { |
||
| 10 | private $long; |
||
| 11 | |||
| 12 | public function __construct($value = null) |
||
| 13 | { |
||
| 14 | if ($value === null) { |
||
| 15 | $value = UuidUtil::generate(); |
||
| 16 | $this->long = $value; |
||
| 17 | return parent::__construct(UuidUtil::toShort($value)); |
||
| 18 | } |
||
| 19 | |||
| 20 | $uuid = (string) $value; |
||
| 21 | |||
| 22 | if (!UuidUtil::validate($uuid)) { |
||
| 23 | $uuid = UuidUtil::fromShort($uuid); |
||
| 24 | } |
||
| 25 | |||
| 26 | if (!UuidUtil::validate($uuid)) { |
||
| 27 | throw MappingException::forInvalidUuid($value); |
||
| 28 | } |
||
| 29 | |||
| 30 | $this->long = $uuid; |
||
| 31 | parent::__construct((string) $value); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getShort(): string |
||
| 35 | { |
||
| 36 | return $this->getValue(); |
||
| 37 | } |
||
| 38 | |||
| 39 | public function getLong(): string |
||
| 42 | } |
||
| 43 | } |
||
| 44 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths