Sandbox::getExpirationTimestamp() return type fixup#82
Conversation
| } | ||
|
|
||
| public function getExpirationAfterHours(): ?int | ||
| public function getExpirationAfterHours(): int |
There was a problem hiding this comment.
takže bych řekl že nikdy nemůže nastat situace, že expirationAfterHours je null
Muze, pokud udelas treba (new Sandbox())->getExpirationAfterHours(). Je to edge-case, ale technicky mozny (https://github.com/keboola/sandboxes/blob/36abe6e826be7bc8628972e5c671e16d1f03771d/src/Library/SandboxFactory.php#L22)
There was a problem hiding this comment.
Jsem zil v domeni ze kdyz je ta property bez default hodnoty
private int $expirationAfterHours;
tak to pak hodi chybu kdyz jsou zaply strict types a neni default hodnota
There was a problem hiding this comment.
Z API se to vsude prevadi pres to Sandbox::fromArray() a tam se vsude misto null natavi 1
There was a problem hiding this comment.
Ahaa, prehlidl jsme, ze ta property neni nullable. To neznamena, ze by tam ten edge-case neni, ale je tma uz davno 😄 a ta tvoje zmena to nijak nezhorsi 👍
Sandbox::fromArray()se upravoval tadye5efdb3#diff-13ebad36f392cf70c46dfa3df6cd7ee23946505c7e424e3b7d5ea0281ae98a72L87
takže bych řekl že nikdy nemůže nastat situace, že
expirationAfterHoursje null