diff --git a/src/Barrier.php b/src/Barrier.php index b7c01f5..f25c8f9 100644 --- a/src/Barrier.php +++ b/src/Barrier.php @@ -31,9 +31,7 @@ final class Barrier private readonly DeferredFuture $completion; /** - * @param int $count - * - * @psalm-param positive-int $count + * @param positive-int $count */ public function __construct(int $count) { @@ -52,9 +50,7 @@ public function getCount(): int } /** - * @param int $count - * - * @psalm-param positive-int $count + * @param positive-int $count */ public function arrive(int $count = 1): void { @@ -75,9 +71,7 @@ public function arrive(int $count = 1): void } /** - * @param int $count - * - * @psalm-param positive-int $count + * @param positive-int $count */ public function register(int $count = 1): void { diff --git a/src/SharedMemoryParcel.php b/src/SharedMemoryParcel.php index 3014788..e170814 100644 --- a/src/SharedMemoryParcel.php +++ b/src/SharedMemoryParcel.php @@ -48,14 +48,10 @@ final class SharedMemoryParcel implements Parcel /** * @param Mutex $mutex Mutex to control access to the shared memory. Recommended: Since lock {@see PosixSemaphore} * wrapped in an instance of {@see SemaphoreMutex}. - * @param mixed $value * @param int $size The initial size in bytes of the shared memory segment. It will automatically be * expanded as necessary. * @param int $permissions Permissions to access the semaphore. Use file permission format specified as * 0xxx. - * @param Serializer|null $serializer - * - * @return self * * @throws ParcelException * @throws SyncException @@ -82,11 +78,7 @@ public static function create( } /** - * @param Mutex $mutex * @param int $key Use {@see getKey()} on the creating process and send this key to another process. - * @param Serializer|null $serializer - * - * @return self * * @throws ParcelException */ @@ -110,10 +102,6 @@ public static function use(Mutex $mutex, int $key, ?Serializer $serializer = nul private readonly Serializer $serializer; - /** - * @param int $key - * @param Serializer|null $serializer - */ private function __construct(int $key, Mutex $mutex, ?Serializer $serializer = null) { if (!\extension_loaded("shmop")) { @@ -189,10 +177,6 @@ public function __sleep() } /** - * @param mixed $value - * @param int $size - * @param int $permissions - * * @throws ParcelException * @throws \Error If the size or permissions are invalid. */ @@ -231,8 +215,6 @@ private function isFreed(): bool } /** - * @return mixed - * * @throws ParcelException * @throws SerializationException */ diff --git a/src/functions.php b/src/functions.php index 11f2deb..7190432 100644 --- a/src/functions.php +++ b/src/functions.php @@ -12,9 +12,7 @@ * * @template T * - * @param Mutex $mutex - * @param \Closure(...mixed):T $synchronized - * @param mixed ...$args + * @param \Closure(...):T $synchronized * * @return T The return value of the Closure. */ diff --git a/test/AbstractSemaphoreTest.php b/test/AbstractSemaphoreTest.php index b7e6db5..f8f75c3 100644 --- a/test/AbstractSemaphoreTest.php +++ b/test/AbstractSemaphoreTest.php @@ -13,8 +13,6 @@ abstract class AbstractSemaphoreTest extends AsyncTestCase /** * @param int $locks Number of locks in the semaphore. - * - * @return Semaphore */ abstract public function createSemaphore(int $locks): Semaphore; diff --git a/test/PosixSemaphoreTest.php b/test/PosixSemaphoreTest.php index 2577c40..7f49850 100644 --- a/test/PosixSemaphoreTest.php +++ b/test/PosixSemaphoreTest.php @@ -38,12 +38,7 @@ public function tearDown(): void delay(1); } - /** - * @param int $locks - * - * @return PosixSemaphore - */ - public function createSemaphore(int $locks): Semaphore + public function createSemaphore(int $locks): PosixSemaphore { return PosixSemaphore::create($locks); }