@@ -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 ;
0 commit comments