1
0
mirror of https://github.com/danog/loop.git synced 2024-11-26 11:54:51 +01:00

Psalm fixes

This commit is contained in:
Daniil Gentili 2023-09-30 14:26:17 +02:00
parent 5595a420e1
commit 7da78299b6
4 changed files with 8 additions and 16 deletions

View File

@ -13,6 +13,8 @@ namespace danog\Loop;
/** /**
* Generic loop, runs single callable. * Generic loop, runs single callable.
* *
* @api
*
* @author Daniil Gentili <daniil@daniil.it> * @author Daniil Gentili <daniil@daniil.it>
*/ */
class GenericLoop extends Loop class GenericLoop extends Loop

View File

@ -18,6 +18,8 @@ use Stringable;
/** /**
* Generic loop, runs single callable. * Generic loop, runs single callable.
* *
* @api
*
* @author Daniil Gentili <daniil@daniil.it> * @author Daniil Gentili <daniil@daniil.it>
*/ */
abstract class Loop implements Stringable abstract class Loop implements Stringable
@ -54,6 +56,8 @@ abstract class Loop implements Stringable
/** /**
* Report pause, can be overriden for logging. * Report pause, can be overriden for logging.
* *
* @psalm-suppress PossiblyUnusedParam
*
* @param float $timeout Pause duration, 0 = forever * @param float $timeout Pause duration, 0 = forever
*/ */
protected function reportPause(float $timeout): void protected function reportPause(float $timeout): void

View File

@ -12,6 +12,8 @@ namespace danog\Loop;
/** /**
* Periodic loop. * Periodic loop.
* *
* @api
*
* @author Daniil Gentili <daniil@daniil.it> * @author Daniil Gentili <daniil@daniil.it>
*/ */
class PeriodicLoop extends GenericLoop class PeriodicLoop extends GenericLoop

View File

@ -1,19 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="dev-master@9725dafb7e0e0693cd8eee14d83d48db2cef39cd"> <files psalm-version="dev-master@9725dafb7e0e0693cd8eee14d83d48db2cef39cd">
<file src="lib/Generic/GenericLoop.php">
<DocblockTypeContradiction>
<code>$callable instanceof \Closure</code>
</DocblockTypeContradiction>
<MixedPropertyTypeCoercion>
<code>$callable</code>
</MixedPropertyTypeCoercion>
</file>
<file src="lib/Generic/PeriodicLoop.php">
<DocblockTypeContradiction>
<code>$callback instanceof \Closure</code>
</DocblockTypeContradiction>
<MixedPropertyTypeCoercion>
<code>$callback</code>
</MixedPropertyTypeCoercion>
</file>
</files> </files>