Skip to content

Commit 3ba1eb5

Browse files
authored
Merge pull request #6470 from kenjis/fix-phpstan-errors
refactor: fix PHPStan errors
2 parents 57385ea + 1479d28 commit 3ba1eb5

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

phpstan-baseline.neon.dist

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,6 @@ parameters:
5555
count: 1
5656
path: system/Cache/Handlers/FileHandler.php
5757

58-
-
59-
message: "#^Method MemcachePool\\:\\:decrement\\(\\) invoked with 4 parameters, 1\\-2 required\\.$#"
60-
count: 1
61-
path: system/Cache/Handlers/MemcachedHandler.php
62-
63-
-
64-
message: "#^Method MemcachePool\\:\\:increment\\(\\) invoked with 4 parameters, 1\\-2 required\\.$#"
65-
count: 1
66-
path: system/Cache/Handlers/MemcachedHandler.php
67-
6858
-
6959
message: "#^Unreachable statement \\- code above always terminates\\.$#"
7060
count: 1
@@ -545,11 +535,6 @@ parameters:
545535
count: 1
546536
path: system/HTTP/Request.php
547537

548-
-
549-
message: "#^Cannot unset offset 'path' on array{host: non-empty-string}\\.$#"
550-
count: 1
551-
path: system/HTTP/URI.php
552-
553538
-
554539
message: "#^Property CodeIgniter\\\\HTTP\\\\URI\\:\\:\\$fragment \\(string\\) on left side of \\?\\? is not nullable\\.$#"
555540
count: 1
@@ -580,11 +565,6 @@ parameters:
580565
count: 1
581566
path: system/Helpers/number_helper.php
582567

583-
-
584-
message: "#^Variable \\$pool might not be defined\\.$#"
585-
count: 2
586-
path: system/Helpers/text_helper.php
587-
588568
-
589569
message: "#^Variable \\$count might not be defined\\.$#"
590570
count: 1

system/Model.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ public function insert($data = null, bool $returnID = true)
654654
{
655655
if (! empty($this->tempData['data'])) {
656656
if (empty($data)) {
657-
$data = $this->tempData['data'] ?? null;
657+
$data = $this->tempData['data'];
658658
} else {
659659
$data = $this->transformDataToArray($data, 'insert');
660660
$data = array_merge($this->tempData['data'], $data);
@@ -680,7 +680,7 @@ public function update($id = null, $data = null): bool
680680
{
681681
if (! empty($this->tempData['data'])) {
682682
if (empty($data)) {
683-
$data = $this->tempData['data'] ?? null;
683+
$data = $this->tempData['data'];
684684
} else {
685685
$data = $this->transformDataToArray($data, 'update');
686686
$data = array_merge($this->tempData['data'], $data);

0 commit comments

Comments
 (0)