Skip to content

Commit 1479d28

Browse files
committed
refactor: fix PHPStan error
------ ------------------------------------------------------------------------------ Line system/Model.php ------ ------------------------------------------------------------------------------ 657 Offset 'data' on array on left side of ?? always exists and is not nullable. 683 Offset 'data' on array on left side of ?? always exists and is not nullable. ------ ------------------------------------------------------------------------------
1 parent f957100 commit 1479d28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)