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
3 changes: 1 addition & 2 deletions system/Boot.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,8 @@ protected static function initializeConsole(): Console
$console = new Console();

// Show basic information before we do anything else.
// @phpstan-ignore-next-line
if (is_int($suppress = array_search('--no-header', $_SERVER['argv'], true))) {
unset($_SERVER['argv'][$suppress]); // @phpstan-ignore-line
unset($_SERVER['argv'][$suppress]);
$suppress = true;
}

Expand Down
12 changes: 1 addition & 11 deletions utils/phpstan-baseline/codeigniter.superglobalAccess.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 79 errors
# total 77 errors

parameters:
ignoreErrors:
Expand All @@ -12,11 +12,6 @@ parameters:
count: 1
path: ../../system/CLI/CLI.php

-
message: '#^Accessing offset ''argv'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../system/CLI/CLI.php

-
message: '#^Accessing offset ''encryption\.key'' directly on \$_SERVER is discouraged\.$#'
count: 1
Expand Down Expand Up @@ -152,11 +147,6 @@ parameters:
count: 1
path: ../../tests/system/CLI/ConsoleTest.php

-
message: '#^Accessing offset ''argv'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/CLI/ConsoleTest.php

-
message: '#^Accessing offset ''encryption\.key'' directly on \$_SERVER is discouraged\.$#'
count: 1
Expand Down
237 changes: 1 addition & 236 deletions utils/phpstan-baseline/codeigniter.superglobalAccessAssign.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 581 errors
# total 466 errors

parameters:
ignoreErrors:
Expand All @@ -17,46 +17,11 @@ parameters:
count: 3
path: ../../system/HTTP/IncomingRequest.php

-
message: '#^Assigning 3 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/CLI/CLITest.php

-
message: '#^Assigning array\{''ignored'', ''b'', ''c'', ''\-\-parm'', ''pvalue'', ''d'', ''\-\-p2'', ''\-\-p3'', ''value 3''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/CLI/CLITest.php

-
message: '#^Assigning array\{''ignored'', ''b'', ''c'', ''\-\-parm'', ''pvalue'', ''d''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/CLI/CLITest.php

-
message: '#^Assigning array\{''ignored'', ''b'', ''c'', ''d'', ''\-\-parm'', ''pvalue'', ''d2'', ''da\-sh'', ''\-\-fix'', ''\-\-opt\-in'', ''sure''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/CLI/CLITest.php

-
message: '#^Assigning array\{''ignored'', ''b'', ''c''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/CLI/CLITest.php

-
message: '#^Assigning ''http\://example\.com/'' directly on offset ''app\.baseURL'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/CLI/ConsoleTest.php

-
message: '#^Assigning int\<1, max\> directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/CLI/ConsoleTest.php

-
message: '#^Assigning non\-empty\-array\<int\|string, string\> directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/CLI/ConsoleTest.php

-
message: '#^Assigning ''/index\.php'' directly on offset ''SCRIPT_NAME'' of \$_SERVER is discouraged\.$#'
count: 1
Expand All @@ -67,11 +32,6 @@ parameters:
count: 1
path: ../../tests/system/Cache/ResponseCacheTest.php

-
message: '#^Assigning non\-empty\-list\<string\> directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/Cache/ResponseCacheTest.php

-
message: '#^Assigning non\-falsy\-string directly on offset ''REQUEST_URI'' of \$_SERVER is discouraged\.$#'
count: 1
Expand Down Expand Up @@ -152,46 +112,6 @@ parameters:
count: 1
path: ../../tests/system/CodeIgniterTest.php

-
message: '#^Assigning 1 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
count: 5
path: ../../tests/system/CodeIgniterTest.php

-
message: '#^Assigning 2 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
count: 26
path: ../../tests/system/CodeIgniterTest.php

-
message: '#^Assigning array\{''index\.php'', ''/''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 11
path: ../../tests/system/CodeIgniterTest.php

-
message: '#^Assigning array\{''index\.php'', ''cli''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/CodeIgniterTest.php

-
message: '#^Assigning array\{''index\.php'', ''example''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 6
path: ../../tests/system/CodeIgniterTest.php

-
message: '#^Assigning array\{''index\.php'', ''image''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/CodeIgniterTest.php

-
message: '#^Assigning array\{''index\.php'', ''pages/about''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 7
path: ../../tests/system/CodeIgniterTest.php

-
message: '#^Assigning array\{''index\.php''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 5
path: ../../tests/system/CodeIgniterTest.php

-
message: '#^Assigning non\-falsy\-string directly on offset ''REQUEST_URI'' of \$_SERVER is discouraged\.$#'
count: 1
Expand Down Expand Up @@ -242,16 +162,6 @@ parameters:
count: 38
path: ../../tests/system/Filters/FiltersTest.php

-
message: '#^Assigning 2 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/Filters/FiltersTest.php

-
message: '#^Assigning array\{''spark'', ''list''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/Filters/FiltersTest.php

-
message: '#^Assigning ''POST'' directly on offset ''REQUEST_METHOD'' of \$_SERVER is discouraged\.$#'
count: 1
Expand All @@ -267,56 +177,6 @@ parameters:
count: 1
path: ../../tests/system/HTTP/CLIRequestTest.php

-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''abc \< def'', ''McDonald\\''s'', ''\<s\>aaa\</s\>''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/CLIRequestTest.php

-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''pro\-file'', ''\-\-foo'', ''bar'', ''\-\-baz'', ''queue some stuff''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/CLIRequestTest.php

-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''profile'', ''\-\-foo'', ''bar'', ''\-\-baz'', ''queue some stuff''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/CLIRequestTest.php

-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''profile'', ''\-\-foo'', ''bar'', ''\-\-foo\-bar'', ''yes''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/CLIRequestTest.php

-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''profile'', ''\-\-foo'', ''bar''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 2
path: ../../tests/system/HTTP/CLIRequestTest.php

-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''profile'', ''\-\-foo'', ''oops'', ''bar'', ''\-\-baz'', ''queue some stuff''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/CLIRequestTest.php

-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''profile'', ''\-\-foo'', ''oops\-bar'', ''\-\-baz'', ''queue some stuff''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/CLIRequestTest.php

-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''profile'', ''\-foo'', ''bar''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/CLIRequestTest.php

-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''profile''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/CLIRequestTest.php

-
message: '#^Assigning array\{''spark'', ''command'', ''param1'', ''param2'', ''\-\-opt1'', ''opt1val'', ''\-\-opt\-2'', ''opt 2 val'', ''param3''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/CLIRequestTest.php

-
message: '#^Assigning ''10'' directly on offset ''HTTP_CONTENT_LENGTH'' of \$_SERVER is discouraged\.$#'
count: 1
Expand Down Expand Up @@ -1052,46 +912,6 @@ parameters:
count: 1
path: ../../tests/system/RESTful/ResourceControllerTest.php

-
message: '#^Assigning 2 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
count: 2
path: ../../tests/system/RESTful/ResourceControllerTest.php

-
message: '#^Assigning 3 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
count: 5
path: ../../tests/system/RESTful/ResourceControllerTest.php

-
message: '#^Assigning 4 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/RESTful/ResourceControllerTest.php

-
message: '#^Assigning array\{''index\.php'', ''work'', ''1'', ''edit''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/RESTful/ResourceControllerTest.php

-
message: '#^Assigning array\{''index\.php'', ''work'', ''1''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/RESTful/ResourceControllerTest.php

-
message: '#^Assigning array\{''index\.php'', ''work'', ''123''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 3
path: ../../tests/system/RESTful/ResourceControllerTest.php

-
message: '#^Assigning array\{''index\.php'', ''work'', ''new''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/RESTful/ResourceControllerTest.php

-
message: '#^Assigning array\{''index\.php'', ''work''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 2
path: ../../tests/system/RESTful/ResourceControllerTest.php

-
message: '#^Assigning ''/work'' directly on offset ''REQUEST_URI'' of \$_SERVER is discouraged\.$#'
count: 1
Expand Down Expand Up @@ -1147,61 +967,6 @@ parameters:
count: 3
path: ../../tests/system/RESTful/ResourcePresenterTest.php

-
message: '#^Assigning 2 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/RESTful/ResourcePresenterTest.php

-
message: '#^Assigning 3 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
count: 4
path: ../../tests/system/RESTful/ResourcePresenterTest.php

-
message: '#^Assigning 4 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
count: 3
path: ../../tests/system/RESTful/ResourcePresenterTest.php

-
message: '#^Assigning array\{''index\.php'', ''work'', ''create''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/RESTful/ResourcePresenterTest.php

-
message: '#^Assigning array\{''index\.php'', ''work'', ''delete'', ''123''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/RESTful/ResourcePresenterTest.php

-
message: '#^Assigning array\{''index\.php'', ''work'', ''edit'', ''1'', ''edit''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/RESTful/ResourcePresenterTest.php

-
message: '#^Assigning array\{''index\.php'', ''work'', ''new''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/RESTful/ResourcePresenterTest.php

-
message: '#^Assigning array\{''index\.php'', ''work'', ''remove'', ''123''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/RESTful/ResourcePresenterTest.php

-
message: '#^Assigning array\{''index\.php'', ''work'', ''show'', ''1''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/RESTful/ResourcePresenterTest.php

-
message: '#^Assigning array\{''index\.php'', ''work'', ''update'', ''123''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/RESTful/ResourcePresenterTest.php

-
message: '#^Assigning array\{''index\.php'', ''work''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/RESTful/ResourcePresenterTest.php

-
message: '#^Assigning ''adm\.example\.com'' directly on offset ''HTTP_HOST'' of \$_SERVER is discouraged\.$#'
count: 4
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 3049 errors
# total 2932 errors
includes:
- argument.type.neon
- assign.propertyType.neon
Expand Down
Loading