Skip to content

Commit

Permalink
chore: Fix phpstan errors
Browse files Browse the repository at this point in the history
  • Loading branch information
neznaika0 committed Feb 23, 2025
1 parent d664c4a commit ff79dcb
Show file tree
Hide file tree
Showing 25 changed files with 25 additions and 29 deletions.
1 change: 1 addition & 0 deletions system/Config/BaseConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ protected function registerProperties()
}

$shortName = (new ReflectionClass($this))->getShortName();
$worker = null;

if (isset(static::$moduleConfig->registrarHasData)) {
// Get all public properties for this config
Expand Down
7 changes: 1 addition & 6 deletions utils/phpstan-baseline/argument.type.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 73 errors
# total 147 errors

parameters:
ignoreErrors:
Expand Down Expand Up @@ -122,11 +122,6 @@ parameters:
count: 1
path: ../../tests/system/Database/Live/SQLite3/AlterTableTest.php

-
message: '#^Parameter \#2 \$forge of class CodeIgniter\\Database\\SQLite3\\Table constructor expects CodeIgniter\\Database\\SQLite3\\Forge, CodeIgniter\\Database\\Forge given\.$#'
count: 1
path: ../../tests/system/Database/Live/SQLite3/AlterTableTest.php

-
message: '#^Parameter \#1 \$set of method CodeIgniter\\Database\\BaseBuilder\:\:updateFields\(\) expects list\<CodeIgniter\\Database\\RawSql\|string\>\|string, array\{0\: ''country'', updated_at\: CodeIgniter\\Database\\RawSql\} given\.$#'
count: 2
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/assign.propertyType.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 20 errors
# total 29 errors

parameters:
ignoreErrors:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 6 errors
# total 14 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/codeigniter.getReassignArray.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 13 errors
# total 22 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/codeigniter.superglobalAccess.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 53 errors
# total 83 errors

parameters:
ignoreErrors:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 260 errors
# total 582 errors

parameters:
ignoreErrors:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 6 errors
# total 9 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/empty.notAllowed.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 77 errors
# total 271 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/method.alreadyNarrowedType.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 16 errors
# total 22 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/method.childReturnType.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 39 errors
# total 40 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/method.notFound.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 40 errors
# total 83 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/missingType.iterableValue.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 1665 errors
# total 1672 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/missingType.property.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 127 errors
# total 130 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/nullCoalesce.property.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 15 errors
# total 22 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/offsetAccess.notFound.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 6 errors
# total 19 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/property.nonObject.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 25 errors
# total 54 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/property.notFound.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 30 errors
# total 58 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/property.protected.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 9 errors
# total 15 errors

parameters:
ignoreErrors:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 16 errors
# total 35 errors

parameters:
ignoreErrors:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 7 errors
# total 21 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/staticMethod.notFound.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 7 errors
# total 20 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/ternary.shortNotAllowed.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 27 errors
# total 38 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/varTag.type.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 8 errors
# total 9 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/variable.undefined.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 15 errors
# total 21 errors

parameters:
ignoreErrors:
Expand Down

0 comments on commit ff79dcb

Please sign in to comment.