From 7da78299b6d3e2f782e16de1ad19ccdc64f65498 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 30 Sep 2023 14:26:17 +0200 Subject: [PATCH] Psalm fixes --- lib/GenericLoop.php | 2 ++ lib/Loop.php | 4 ++++ lib/PeriodicLoop.php | 2 ++ psalm-baseline.xml | 16 ---------------- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/lib/GenericLoop.php b/lib/GenericLoop.php index 7558893..efb8cbc 100644 --- a/lib/GenericLoop.php +++ b/lib/GenericLoop.php @@ -13,6 +13,8 @@ namespace danog\Loop; /** * Generic loop, runs single callable. * + * @api + * * @author Daniil Gentili */ class GenericLoop extends Loop diff --git a/lib/Loop.php b/lib/Loop.php index 4af4bf1..897c0b4 100644 --- a/lib/Loop.php +++ b/lib/Loop.php @@ -18,6 +18,8 @@ use Stringable; /** * Generic loop, runs single callable. * + * @api + * * @author Daniil Gentili */ abstract class Loop implements Stringable @@ -54,6 +56,8 @@ abstract class Loop implements Stringable /** * Report pause, can be overriden for logging. * + * @psalm-suppress PossiblyUnusedParam + * * @param float $timeout Pause duration, 0 = forever */ protected function reportPause(float $timeout): void diff --git a/lib/PeriodicLoop.php b/lib/PeriodicLoop.php index e352d86..67f268c 100644 --- a/lib/PeriodicLoop.php +++ b/lib/PeriodicLoop.php @@ -12,6 +12,8 @@ namespace danog\Loop; /** * Periodic loop. * + * @api + * * @author Daniil Gentili */ class PeriodicLoop extends GenericLoop diff --git a/psalm-baseline.xml b/psalm-baseline.xml index b77163e..658ef3d 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,19 +1,3 @@ - - - $callable instanceof \Closure - - - $callable - - - - - $callback instanceof \Closure - - - $callback - -