Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ parameters:
codeigniter:
additionalServices:
- AfterAutoloadModule\Config\Services
additionalModelNamespaces:
- Tests\Support\Models
checkArgumentTypeOfModel: false
shipmonkBaselinePerIdentifier:
directory: %currentWorkingDirectory%
3 changes: 1 addition & 2 deletions system/Test/Fabricator.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ class Fabricator
*/
public function __construct($model, ?array $formatters = null, ?string $locale = null)
{
if (is_string($model)) {
// Create a new model instance
if (is_string($model) && class_exists($model)) {
$model = model($model, false);
}

Expand Down
12 changes: 1 addition & 11 deletions utils/phpstan-baseline/codeigniter.modelArgumentType.neon
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
# total 3 errors
# total 1 error

parameters:
ignoreErrors:
-
message: '#^Parameter \#1 \$name of function model expects a valid class string, string given\.$#'
count: 1
path: ../../system/Test/Fabricator.php

-
message: '#^Parameter \#1 \$name of function model expects a valid class string, ''JobModel'' given\.$#'
count: 1
path: ../../tests/system/CommonFunctionsTest.php

-
message: '#^Parameter \#1 \$name of function model expects a valid class string, ''CodeIgniter\\\\Shield\\\\Models\\\\UserModel'' given\.$#'
count: 1
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/loader.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 3373 errors
# total 3371 errors
includes:
- argument.type.neon
- assign.propertyType.neon
Expand Down
Loading