Skip to content

Commit e754f0d

Browse files
authored
Fix missingType.return errors
1 parent 50b3f57 commit e754f0d

File tree

1 file changed

+30
-10
lines changed

1 file changed

+30
-10
lines changed

system/Session/SessionInterface.php

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@ interface SessionInterface
2222
* Regenerates the session ID.
2323
*
2424
* @param bool $destroy Should old session data be destroyed?
25+
*
26+
* @return void
2527
*/
26-
public function regenerate(bool $destroy = false);
28+
public function regenerate(bool $destroy = false): void;
2729

2830
/**
2931
* Destroys the current session.
32+
*
33+
* @return void
3034
*/
31-
public function destroy();
35+
public function destroy(): void;
3236

3337
/**
3438
* Sets user data into the session.
@@ -41,8 +45,10 @@ public function destroy();
4145
*
4246
* @param array|string $data Property name or associative array of properties
4347
* @param array|bool|float|int|object|string|null $value Property value if single key provided
48+
*
49+
* @return void
4450
*/
45-
public function set($data, $value = null);
51+
public function set($data, $value = null): void;
4652

4753
/**
4854
* Get user data that has been set in the session.
@@ -74,8 +80,10 @@ public function has(string $key): bool;
7480
* of a specific session property to remove.
7581
*
7682
* @param array|string $key Identifier of the session property or properties to remove.
83+
*
84+
* @return void
7785
*/
78-
public function remove($key);
86+
public function remove($key): void;
7987

8088
/**
8189
* Sets data into the session that will only last for a single request.
@@ -88,8 +96,10 @@ public function remove($key);
8896
*
8997
* @param array|string $data Property identifier or associative array of properties
9098
* @param array|string $value Property value if $data is a scalar
99+
*
100+
* @return void
91101
*/
92-
public function setFlashdata($data, $value = null);
102+
public function setFlashdata($data, $value = null): void;
93103

94104
/**
95105
* Retrieve one or more items of flash data from the session.
@@ -107,8 +117,10 @@ public function getFlashdata(?string $key = null);
107117
* Keeps a single piece of flash data alive for one more request.
108118
*
109119
* @param array|string $key Property identifier or array of them
120+
*
121+
* @return void
110122
*/
111-
public function keepFlashdata($key);
123+
public function keepFlashdata($key): void;
112124

113125
/**
114126
* Mark a session property or properties as flashdata.
@@ -123,8 +135,10 @@ public function markAsFlashdata($key);
123135
* Unmark data in the session as flashdata.
124136
*
125137
* @param array|string $key Property identifier or array of them
138+
*
139+
* @return void
126140
*/
127-
public function unmarkFlashdata($key);
141+
public function unmarkFlashdata($key): void;
128142

129143
/**
130144
* Retrieve all of the keys for session data marked as flashdata.
@@ -140,8 +154,10 @@ public function getFlashKeys(): array;
140154
* @param array|string $data Session data key or associative array of items
141155
* @param array|bool|float|int|object|string|null $value Value to store
142156
* @param int $ttl Time-to-live in seconds
157+
*
158+
* @return void
143159
*/
144-
public function setTempdata($data, $value = null, int $ttl = 300);
160+
public function setTempdata($data, $value = null, int $ttl = 300): void;
145161

146162
/**
147163
* Returns either a single piece of tempdata, or all temp data currently
@@ -157,8 +173,10 @@ public function getTempdata(?string $key = null);
157173
* Removes a single piece of temporary data from the session.
158174
*
159175
* @param string $key Session data key
176+
*
177+
* @return void
160178
*/
161-
public function removeTempdata(string $key);
179+
public function removeTempdata(string $key): void;
162180

163181
/**
164182
* Mark one of more pieces of data as being temporary, meaning that
@@ -176,8 +194,10 @@ public function markAsTempdata($key, int $ttl = 300);
176194
* lifespan and allowing it to live as long as the session does.
177195
*
178196
* @param array|string $key Property identifier or array of them
197+
*
198+
* @return void
179199
*/
180-
public function unmarkTempdata($key);
200+
public function unmarkTempdata($key): void;
181201

182202
/**
183203
* Retrieve the keys of all session data that have been marked as temporary data.

0 commit comments

Comments
 (0)