Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
6 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,9 +56,6 @@ public function nanoseconds(): int | |
return $this->nanoseconds; | ||
} | ||
|
||
/** | ||
* @throws InvalidArgumentException | ||
*/ | ||
public function duration(self $start): Duration | ||
{ | ||
$seconds = $this->seconds - $start->seconds(); | ||
|
@@ -71,7 +68,7 @@ public function duration(self $start): Duration | |
} | ||
|
||
if ($seconds < 0) { | ||
throw new InvalidArgumentException('Start needs to be smaller.'); | ||
return Duration::fromSecondsAndNanoseconds(0, 0); | ||
Check failure on line 71 in src/Event/Value/Telemetry/HRTime.php GitHub Actions / Type CheckerMissingThrowsDocblock
|
||
} | ||
|
||
return Duration::fromSecondsAndNanoseconds( | ||
Check failure on line 74 in src/Event/Value/Telemetry/HRTime.php GitHub Actions / Type CheckerMissingThrowsDocblock
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters