Should the return type not be AbstractEntity|null?
This check compares the return type specified in the @return annotation of a function
or method doc comment with the types returned by the function and raises an issue if they
mismatch.
Both the $myVar assignment in line 1 and the $higher assignment in line 2
are dead. The first because $myVar is never used and the second because
$higher is always overwritten for every possible time line.
Loading history...
40
74
if ($id === null || $id === '') {
41
47
$uuid = Uuid::uuid4();
42
} else {
43
61
if (Uuid::isValid($id)) {
44
60
$uuid = Uuid::fromString($id);
45
} else {
46
1
throw new InvalidUuidStringException('Invalid string');
47
}
48
}
49
50
73
if ($uuid->getVersion() !== Uuid::uuid4()->getVersion()) {
51
1
throw new InvalidUuidStringException('Not supported version: '.$uuid->getVersion());
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.