Skip to content

Commit 95477b4

Browse files
committed
refactor: fix latest phpstan errors
1 parent a02639a commit 95477b4

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

system/Model.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,7 @@ class Model extends BaseModel
146146

147147
public function __construct(?ConnectionInterface $db = null, ?ValidationInterface $validation = null)
148148
{
149-
/**
150-
* @var BaseConnection|null $db
151-
*/
149+
/** @var BaseConnection $db */
152150
$db ??= Database::connect($this->DBGroup);
153151

154152
$this->db = $db;

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 2116 errors
1+
# total 2117 errors
22

33
includes:
44
- argument.type.neon

utils/phpstan-baseline/return.type.neon

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
# total 1 error
1+
# total 2 errors
22

33
parameters:
44
ignoreErrors:
5+
-
6+
message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:cleanClone\(\) should return \$this\(CodeIgniter\\Database\\BaseBuilder\) but returns static\(CodeIgniter\\Database\\BaseBuilder\)\.$#'
7+
count: 1
8+
path: ../../system/Database/BaseBuilder.php
9+
510
-
611
message: '#^Method CodeIgniter\\Router\\Router\:\:getRouteAttributes\(\) should return array\{class\: list\<string\>, method\: list\<string\>\} but returns array\{class\: list\<CodeIgniter\\Router\\Attributes\\RouteAttributeInterface\>, method\: list\<CodeIgniter\\Router\\Attributes\\RouteAttributeInterface\>\}\.$#'
712
count: 1

0 commit comments

Comments
 (0)