Skip to content

Commit 5214258

Browse files
committed
fix: Apply suggestions
1 parent 124c706 commit 5214258

File tree

7 files changed

+14
-27
lines changed

7 files changed

+14
-27
lines changed

system/Session/Handlers/BaseHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ abstract class BaseHandler implements SessionHandlerInterface
9595
* The 'save path' for the session
9696
* varies between.
9797
*
98-
* @var string
98+
* @var array<string, mixed>|string
9999
*/
100100
protected $savePath;
101101

system/Session/Session.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ protected function configure()
152152
{
153153
ini_set('session.name', $this->config->cookieName);
154154

155-
$sameSite = $this->cookie->getSameSite() ?? ucfirst(Cookie::SAMESITE_LAX);
155+
$sameSite = $this->cookie->getSameSite() === ''
156+
? ucfirst(Cookie::SAMESITE_LAX)
157+
: $this->cookie->getSameSite();
156158

157159
$params = [
158160
'lifetime' => $this->config->expiration,

user_guide_src/source/libraries/sessions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ All session data (including flashdata and tempdata) will be destroyed permanentl
395395
stop()
396396
------
397397

398-
.. important:: This method was deprecated as of version v4.3.5 and was removed in v4.7.0.
398+
.. deprecated:: 4.3.5
399399

400400
The session class also has the ``stop()`` method.
401401

utils/phpstan-baseline/assign.propertyType.neon

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 30 errors
1+
# total 29 errors
22

33
parameters:
44
ignoreErrors:
@@ -12,11 +12,6 @@ parameters:
1212
count: 1
1313
path: ../../system/Controller.php
1414

15-
-
16-
message: '#^Property CodeIgniter\\Session\\Handlers\\BaseHandler\:\:\$savePath \(string\) does not accept array\<string, array\<mixed\>\|float\|int\|string\|null\>\.$#'
17-
count: 1
18-
path: ../../system/Session/Handlers/RedisHandler.php
19-
2015
-
2116
message: '#^Property CodeIgniter\\Commands\\Utilities\\Routes\\FilterFinderTest\:\:\$response \(CodeIgniter\\HTTP\\Response\) does not accept CodeIgniter\\HTTP\\ResponseInterface\.$#'
2217
count: 1

utils/phpstan-baseline/loader.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 2739 errors
1+
# total 2736 errors
22

33
includes:
44
- argument.type.neon

utils/phpstan-baseline/offsetAccess.notFound.neon

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
1-
# total 5 errors
1+
# total 2 errors
22

33
parameters:
44
ignoreErrors:
5-
-
6-
message: '#^Offset ''host'' does not exist on non\-falsy\-string\.$#'
7-
count: 1
8-
path: ../../system/Session/Handlers/RedisHandler.php
9-
10-
-
11-
message: '#^Offset ''port'' does not exist on non\-falsy\-string\.$#'
12-
count: 1
13-
path: ../../system/Session/Handlers/RedisHandler.php
14-
15-
-
16-
message: '#^Offset ''timeout'' does not exist on non\-falsy\-string\.$#'
17-
count: 1
18-
path: ../../system/Session/Handlers/RedisHandler.php
19-
205
-
216
message: '#^Offset ''_ci_old_input'' does not exist on array\{\}\.$#'
227
count: 2

utils/phpstan-baseline/property.phpDocType.neon

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 43 errors
1+
# total 44 errors
22

33
parameters:
44
ignoreErrors:
@@ -167,6 +167,11 @@ parameters:
167167
count: 1
168168
path: ../../system/Images/Handlers/ImageMagickHandler.php
169169

170+
-
171+
message: '#^PHPDoc type string of property CodeIgniter\\Session\\Handlers\\FileHandler\:\:\$savePath is not the same as PHPDoc type array\<string, mixed\>\|string of overridden property CodeIgniter\\Session\\Handlers\\BaseHandler\:\:\$savePath\.$#'
172+
count: 1
173+
path: ../../system/Session/Handlers/FileHandler.php
174+
170175
-
171176
message: '#^PHPDoc type CodeIgniter\\Test\\Mock\\MockConnection of property CodeIgniter\\Database\\Builder\\InsertTest\:\:\$db is not the same as PHPDoc type CodeIgniter\\Database\\BaseConnection of overridden property CodeIgniter\\Test\\CIUnitTestCase\:\:\$db\.$#'
172177
count: 1

0 commit comments

Comments
 (0)