Skip to content

feat: add Model::firstOrInsert() with failure handling #13855

feat: add Model::firstOrInsert() with failure handling

feat: add Model::firstOrInsert() with failure handling #13855

Triggered via pull request February 27, 2026 20:03
Status Failure
Total duration 1m 9s
Artifacts

test-phpstan.yml

on: pull_request
PHP Static Analysis
1m 3s
PHP Static Analysis
Fit to window
Zoom out
Zoom in

Annotations

10 errors
PHP Static Analysis: tests/system/Models/FirstOrInsertModelTest.php#L99
Cannot access property $name on array|object.
PHP Static Analysis: tests/system/Models/FirstOrInsertModelTest.php#L85
Cannot access property $email on array|object.
PHP Static Analysis: tests/system/Models/FirstOrInsertModelTest.php#L71
Cannot access property $country on array|object.
PHP Static Analysis: tests/system/Models/FirstOrInsertModelTest.php#L70
Cannot access property $name on array|object.
PHP Static Analysis: tests/system/Models/FirstOrInsertModelTest.php#L45
Cannot access property $country on array|object|false.
PHP Static Analysis: tests/system/Models/FirstOrInsertModelTest.php#L44
Cannot access property $email on array|object|false.
PHP Static Analysis: tests/system/Models/FirstOrInsertModelTest.php#L43
Cannot access property $name on array|object|false.
PHP Static Analysis: tests/system/Models/FirstOrInsertModelTest.php#L42
Call to method PHPUnit\Framework\Assert::assertNotNull() with array|object|false will always evaluate to true.
PHP Static Analysis: system/Model.php#L750
Dead catch - CodeIgniter\Database\Exceptions\UniqueConstraintViolationException is never thrown in the try block.
PHP Static Analysis: system/Model.php#L727
Method CodeIgniter\Model::firstOrInsert() return type has no value type specified in iterable type array.