Skip to content

Commit

Permalink
Merge pull request codeigniter4#8046 from kenjis/refactor-BaseModel-a…
Browse files Browse the repository at this point in the history
…ssert

[4.5] refactor: remove BaseModel assert()
  • Loading branch information
kenjis authored Oct 18, 2023
2 parents 7b1500c + dedb5fa commit 232ddfa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
5 changes: 0 additions & 5 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@
'count' => 1,
'path' => __DIR__ . '/system/BaseModel.php',
];
$ignoreErrors[] = [
'message' => '#^Only booleans are allowed in an if condition, int given\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/BaseModel.php',
];
$ignoreErrors[] = [
'message' => '#^Strict comparison using \\!\\=\\= between mixed and null will always evaluate to true\\.$#',
'count' => 1,
Expand Down
2 changes: 0 additions & 2 deletions system/BaseModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -1640,8 +1640,6 @@ protected function objectToArray($data, bool $onlyChanged = true, bool $recursiv
{
$properties = $this->objectToRawArray($data, $onlyChanged, $recursive);

assert(is_array($properties));

// Convert any Time instances to appropriate $dateFormat
if ($properties !== []) {
$properties = array_map(function ($value) {
Expand Down

0 comments on commit 232ddfa

Please sign in to comment.