@@ -9,12 +9,8 @@ trait WithoutOverlapping
99{
1010 /**
1111 * Overwrite the console command initialization.
12- *
13- * @param \Symfony\Component\Console\Input\InputInterface $input
14- * @param \Symfony\Component\Console\Output\OutputInterface $output
15- * @return void
1612 */
17- protected function initialize (InputInterface $ input , OutputInterface $ output )
13+ protected function initialize (InputInterface $ input , OutputInterface $ output ): void
1814 {
1915 $ this ->initializeMutex ();
2016
@@ -23,10 +19,8 @@ protected function initialize(InputInterface $input, OutputInterface $output)
2319
2420 /**
2521 * Initialize the mutex.
26- *
27- * @return void
2822 */
29- protected function initializeMutex ()
23+ protected function initializeMutex (): void
3024 {
3125 $ mutex = new Mutex ($ this );
3226
@@ -42,10 +36,8 @@ protected function initializeMutex()
4236 * Get the mutex strategy.
4337 *
4438 * Currently supported: "file", "mysql", "redis" and "memcached".
45- *
46- * @return string
4739 */
48- public function getMutexStrategy ()
40+ public function getMutexStrategy (): string
4941 {
5042 return property_exists ($ this , 'mutexStrategy ' )
5143 ? $ this ->mutexStrategy
@@ -56,11 +48,8 @@ public function getMutexStrategy()
5648 * Set the mutex strategy.
5749 *
5850 * Currently supported: "file", "mysql", "redis" and "memcached".
59- *
60- * @param string $strategy
61- * @return void
6251 */
63- public function setMutexStrategy ($ strategy )
52+ public function setMutexStrategy (string $ strategy ): void
6453 {
6554 $ this ->mutexStrategy = $ strategy ;
6655 }
@@ -72,10 +61,8 @@ public function setMutexStrategy($strategy)
7261 * `0` - check without waiting;
7362 * `{milliseconds}` - check, and wait for a maximum of milliseconds specified;
7463 * `null` - wait, till running command finish its execution;
75- *
76- * @return int|null
7764 */
78- public function getMutexTimeout ()
65+ public function getMutexTimeout (): int | null
7966 {
8067 return property_exists ($ this , 'mutexTimeout ' )
8168 ? $ this ->mutexTimeout
@@ -89,21 +76,16 @@ public function getMutexTimeout()
8976 * `0` - check without waiting;
9077 * `{milliseconds}` - check, and wait for a maximum of milliseconds specified;
9178 * `null` - wait, till running command finish its execution;
92- *
93- * @param int|null $timeout
94- * @return void
9579 */
96- public function setMutexTimeout ($ timeout )
80+ public function setMutexTimeout (int | null $ timeout ): void
9781 {
9882 $ this ->mutexTimeout = $ timeout ;
9983 }
10084
10185 /**
10286 * Get the mutex name.
103- *
104- * @return string
10587 */
106- public function getMutexName ()
88+ public function getMutexName (): string
10789 {
10890 $ name = $ this ->getName ();
10991 $ argumentsHash = md5 (json_encode ($ this ->argument ()));
@@ -113,10 +95,8 @@ public function getMutexName()
11395
11496 /**
11597 * Get the mutex file storage path.
116- *
117- * @return string
11898 */
119- public function getMutexFileStorage ()
99+ public function getMutexFileStorage (): string
120100 {
121101 return storage_path ('app ' );
122102 }
@@ -125,11 +105,8 @@ public function getMutexFileStorage()
125105 * Release the mutex lock.
126106 *
127107 * Called automatically, because it's registered as a shutdown function.
128- *
129- * @param \Illuminated\Console\Mutex $mutex
130- * @return void
131108 */
132- public function releaseMutexLock (Mutex $ mutex )
109+ public function releaseMutexLock (Mutex $ mutex ): void
133110 {
134111 $ mutex ->releaseLock ();
135112 }
0 commit comments