@@ -9,12 +9,8 @@ trait WithoutOverlapping
9
9
{
10
10
/**
11
11
* 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
16
12
*/
17
- protected function initialize (InputInterface $ input , OutputInterface $ output )
13
+ protected function initialize (InputInterface $ input , OutputInterface $ output ): void
18
14
{
19
15
$ this ->initializeMutex ();
20
16
@@ -23,10 +19,8 @@ protected function initialize(InputInterface $input, OutputInterface $output)
23
19
24
20
/**
25
21
* Initialize the mutex.
26
- *
27
- * @return void
28
22
*/
29
- protected function initializeMutex ()
23
+ protected function initializeMutex (): void
30
24
{
31
25
$ mutex = new Mutex ($ this );
32
26
@@ -42,10 +36,8 @@ protected function initializeMutex()
42
36
* Get the mutex strategy.
43
37
*
44
38
* Currently supported: "file", "mysql", "redis" and "memcached".
45
- *
46
- * @return string
47
39
*/
48
- public function getMutexStrategy ()
40
+ public function getMutexStrategy (): string
49
41
{
50
42
return property_exists ($ this , 'mutexStrategy ' )
51
43
? $ this ->mutexStrategy
@@ -56,11 +48,8 @@ public function getMutexStrategy()
56
48
* Set the mutex strategy.
57
49
*
58
50
* Currently supported: "file", "mysql", "redis" and "memcached".
59
- *
60
- * @param string $strategy
61
- * @return void
62
51
*/
63
- public function setMutexStrategy ($ strategy )
52
+ public function setMutexStrategy (string $ strategy ): void
64
53
{
65
54
$ this ->mutexStrategy = $ strategy ;
66
55
}
@@ -72,10 +61,8 @@ public function setMutexStrategy($strategy)
72
61
* `0` - check without waiting;
73
62
* `{milliseconds}` - check, and wait for a maximum of milliseconds specified;
74
63
* `null` - wait, till running command finish its execution;
75
- *
76
- * @return int|null
77
64
*/
78
- public function getMutexTimeout ()
65
+ public function getMutexTimeout (): int | null
79
66
{
80
67
return property_exists ($ this , 'mutexTimeout ' )
81
68
? $ this ->mutexTimeout
@@ -89,21 +76,16 @@ public function getMutexTimeout()
89
76
* `0` - check without waiting;
90
77
* `{milliseconds}` - check, and wait for a maximum of milliseconds specified;
91
78
* `null` - wait, till running command finish its execution;
92
- *
93
- * @param int|null $timeout
94
- * @return void
95
79
*/
96
- public function setMutexTimeout ($ timeout )
80
+ public function setMutexTimeout (int | null $ timeout ): void
97
81
{
98
82
$ this ->mutexTimeout = $ timeout ;
99
83
}
100
84
101
85
/**
102
86
* Get the mutex name.
103
- *
104
- * @return string
105
87
*/
106
- public function getMutexName ()
88
+ public function getMutexName (): string
107
89
{
108
90
$ name = $ this ->getName ();
109
91
$ argumentsHash = md5 (json_encode ($ this ->argument ()));
@@ -113,10 +95,8 @@ public function getMutexName()
113
95
114
96
/**
115
97
* Get the mutex file storage path.
116
- *
117
- * @return string
118
98
*/
119
- public function getMutexFileStorage ()
99
+ public function getMutexFileStorage (): string
120
100
{
121
101
return storage_path ('app ' );
122
102
}
@@ -125,11 +105,8 @@ public function getMutexFileStorage()
125
105
* Release the mutex lock.
126
106
*
127
107
* Called automatically, because it's registered as a shutdown function.
128
- *
129
- * @param \Illuminated\Console\Mutex $mutex
130
- * @return void
131
108
*/
132
- public function releaseMutexLock (Mutex $ mutex )
109
+ public function releaseMutexLock (Mutex $ mutex ): void
133
110
{
134
111
$ mutex ->releaseLock ();
135
112
}
0 commit comments