diff --git a/Stopwatch.php b/Stopwatch.php index 139d665..bf65ac3 100644 --- a/Stopwatch.php +++ b/Stopwatch.php @@ -57,11 +57,9 @@ public function getSections(): array * * @param string|null $id The id of the session to re-open, null to create a new one * - * @return void - * * @throws \LogicException When the section to re-open is not reachable */ - public function openSection(string $id = null) + public function openSection(string $id = null): void { $current = end($this->activeSections); @@ -81,11 +79,9 @@ public function openSection(string $id = null) * * @see getSectionEvents() * - * @return void - * * @throws \LogicException When there's no started section to be stopped */ - public function stopSection(string $id) + public function stopSection(string $id): void { $this->stop('__section__'); @@ -149,10 +145,8 @@ public function getSectionEvents(string $id): array /** * Resets the stopwatch to its original state. - * - * @return void */ - public function reset() + public function reset(): void { $this->sections = $this->activeSections = ['__root__' => new Section(null, $this->morePrecision)]; } diff --git a/StopwatchEvent.php b/StopwatchEvent.php index 3bca2fd..4492d2d 100644 --- a/StopwatchEvent.php +++ b/StopwatchEvent.php @@ -116,10 +116,8 @@ public function lap(): static /** * Stops all non already stopped periods. - * - * @return void */ - public function ensureStopped() + public function ensureStopped(): void { while (\count($this->started)) { $this->stop();