Skip to content

Commit cc0a6e1

Browse files
committed
chore: set php-cs-fixer rule no_superfluous_phpdoc_tags to true
1 parent 46589d1 commit cc0a6e1

17 files changed

Lines changed: 2 additions & 252 deletions

.php-cs-fixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
]
3131
],
3232
'no_php4_constructor' => true,
33-
'no_superfluous_phpdoc_tags' => false,
33+
'no_superfluous_phpdoc_tags' => true,
3434
'no_unreachable_default_argument_value' => true,
3535
'no_useless_else' => true,
3636
'no_useless_return' => true,

src/ArrayManager.php

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ abstract protected static function startSessionIfNotHasStarted();
1818
abstract protected static function startSessionIfNotHasStartedForceWrite();
1919

2020
/**
21-
* @param string $key
22-
* @param mixed $value
23-
*
2421
* @throws SessionException
2522
*/
2623
public static function set(string $key, $value): void
@@ -31,11 +28,7 @@ public static function set(string $key, $value): void
3128
}
3229

3330
/**
34-
* @param string $key
35-
*
3631
* @throws SessionException
37-
*
38-
* @return bool
3932
*/
4033
public static function has(string $key): bool
4134
{
@@ -45,12 +38,7 @@ public static function has(string $key): bool
4538
}
4639

4740
/**
48-
* @param string $key
49-
* @param mixed $value
50-
*
5141
* @throws SessionException
52-
*
53-
* @return bool
5442
*/
5543
public static function hasKeyAndValue(string $key, $value): bool
5644
{
@@ -60,11 +48,7 @@ public static function hasKeyAndValue(string $key, $value): bool
6048
}
6149

6250
/**
63-
* @param string $key
64-
*
6551
* @throws SessionException
66-
*
67-
* @return mixed
6852
*/
6953
public static function get(string $key)
7054
{
@@ -74,8 +58,6 @@ public static function get(string $key)
7458
}
7559

7660
/**
77-
* @param string $key
78-
*
7961
* @throws SessionException
8062
*/
8163
public static function remove(string $key): void
@@ -89,8 +71,6 @@ public static function remove(string $key): void
8971

9072
/**
9173
* @throws SessionException
92-
*
93-
* @return array
9474
*/
9575
public static function getAll(): array
9676
{
@@ -100,11 +80,7 @@ public static function getAll(): array
10080
}
10181

10282
/**
103-
* @param string $key
104-
*
10583
* @throws SessionException
106-
*
107-
* @return mixed
10884
*/
10985
public static function getAndRemove(string $key)
11086
{
@@ -116,49 +92,26 @@ public static function getAndRemove(string $key)
11692
return $value;
11793
}
11894

119-
/**
120-
* @param string $key
121-
* @param mixed $value
122-
*/
12395
public static function setFlash(string $key, $value): void
12496
{
12597
static::$flashData[$key] = $value;
12698
}
12799

128-
/**
129-
* @param string $key
130-
*
131-
* @return bool
132-
*/
133100
public static function hasFlash(string $key): bool
134101
{
135102
return \array_key_exists($key, static::$flashData);
136103
}
137104

138-
/**
139-
* @param string $key
140-
* @param mixed $value
141-
*
142-
* @return bool
143-
*/
144105
public static function hasFlashKeyAndValue(string $key, $value): bool
145106
{
146107
return \array_key_exists($key, static::$flashData) && static::$flashData[$key] === $value;
147108
}
148109

149-
/**
150-
* @param string $key
151-
*
152-
* @return mixed
153-
*/
154110
public static function getFlash(string $key)
155111
{
156112
return (static::hasFlash($key)) ? static::$flashData[$key] : null;
157113
}
158114

159-
/**
160-
* @param string $key
161-
*/
162115
public static function removeFlash(string $key): void
163116
{
164117
if (static::hasFlash($key)) {
@@ -167,8 +120,6 @@ public static function removeFlash(string $key): void
167120
}
168121

169122
/**
170-
* @param array $keys
171-
*
172123
* @throws SessionException
173124
*/
174125
public static function keepFlash(array $keys = []): void
@@ -188,9 +139,6 @@ public static function keepFlash(array $keys = []): void
188139
}
189140
}
190141

191-
/**
192-
* @return array
193-
*/
194142
public static function getAllFlash(): array
195143
{
196144
return static::$flashData;

src/Database.php

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,17 @@ public function setNewDatabase($configuration): void
4141
}
4242
}
4343

44-
/**
45-
* @param DB $database
46-
*/
4744
public function setCurrentDatabase(DB $database): void
4845
{
4946
$this->db = $database;
5047
}
5148

52-
/**
53-
* @param int|null $userId
54-
*/
5549
public function setUserId(?int $userId): void
5650
{
5751
$this->userId = $userId;
5852
}
5953

6054
/**
61-
* @param int $length
62-
*
6355
* @throws SessionException
6456
*/
6557
public function setLengthSessionID(int $length): void
@@ -79,17 +71,12 @@ public function getLengthSessionID(): int
7971
/**
8072
* @param string $path
8173
* @param string $name
82-
*
83-
* @return bool
8474
*/
8575
public function open($path, $name): bool
8676
{
8777
return true;
8878
}
8979

90-
/**
91-
* @return bool
92-
*/
9380
public function close(): bool
9481
{
9582
return true;
@@ -99,8 +86,6 @@ public function close(): bool
9986
* @param string $id
10087
*
10188
* @throws SessionException
102-
*
103-
* @return string
10489
*/
10590
public function read($id): string
10691
{
@@ -119,8 +104,6 @@ public function read($id): string
119104
* @param string $data
120105
*
121106
* @throws SessionException
122-
*
123-
* @return bool
124107
*/
125108
public function write($id, $data): bool
126109
{
@@ -140,8 +123,6 @@ public function write($id, $data): bool
140123
* @param string $id
141124
*
142125
* @throws SessionException
143-
*
144-
* @return bool
145126
*/
146127
public function destroy($id): bool
147128
{
@@ -161,8 +142,6 @@ public function destroy($id): bool
161142
*
162143
* @throws SessionException
163144
*
164-
* @return bool
165-
*
166145
* @noinspection PhpLanguageLevelInspection
167146
*/
168147
#[\ReturnTypeWillChange]
@@ -186,8 +165,6 @@ public function gc($max_lifetime): bool
186165
*
187166
* @throws SessionException
188167
*
189-
* @return bool
190-
*
191168
* @noinspection PhpMissingParamTypeInspection
192169
*/
193170
public function validateId($id): bool
@@ -215,8 +192,6 @@ public function validateId($id): bool
215192
*
216193
* @throws SessionException
217194
*
218-
* @return bool
219-
*
220195
* @noinspection PhpMissingParamTypeInspection
221196
*/
222197
public function updateTimestamp($id, $data): bool
@@ -227,8 +202,6 @@ public function updateTimestamp($id, $data): bool
227202
/**
228203
* @throws SessionException
229204
*
230-
* @return string
231-
*
232205
* @noinspection PhpMethodNamingConventionInspection
233206
*/
234207
public function create_sid(): string // phpcs:ignore

src/DatabaseEncryption.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ class DatabaseEncryption extends Database
1515
* @param string $id
1616
*
1717
* @throws SessionException
18-
*
19-
* @return string
2018
*/
2119
public function read($id): string
2220
{
@@ -30,8 +28,6 @@ public function read($id): string
3028
* @param string $data
3129
*
3230
* @throws SessionException
33-
*
34-
* @return bool
3531
*/
3632
public function write($id, $data): bool
3733
{

src/DefaultEncryption.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ class DefaultEncryption extends SessionHandler
1717
* @param string $id
1818
*
1919
* @throws SessionException
20-
*
21-
* @return string
2220
*/
2321
public function read($id): string
2422
{
@@ -32,8 +30,6 @@ public function read($id): string
3230
* @param string $data
3331
*
3432
* @throws SessionException
35-
*
36-
* @return bool
3733
*/
3834
public function write($id, $data): bool
3935
{

0 commit comments

Comments
 (0)