Skip to content

Commit

Permalink
declare more precise types (#5403)
Browse files Browse the repository at this point in the history
Co-authored-by: staabm <staabm@users.noreply.github.com>
Co-authored-by: Markus Staab <m.staab@complex-it.de>
Co-authored-by: clxmstaab <clxmstaab@users.noreply.github.com>
  • Loading branch information
4 people committed Dec 29, 2022
1 parent f8aef23 commit a22a183
Show file tree
Hide file tree
Showing 22 changed files with 373 additions and 174 deletions.
75 changes: 75 additions & 0 deletions .tools/phpstan/baseline.neon
Expand Up @@ -235,6 +235,11 @@ parameters:
count: 1
path: ../../redaxo/src/addons/install/lib/package/package_download.php

-
message: "#^Property rex_install_package_download\\:\\:\\$addonkey \\(non\\-empty\\-string\\) does not accept string\\.$#"
count: 1
path: ../../redaxo/src/addons/install/lib/package/package_download.php

-
message: "#^Method rex_install_package_update\\:\\:checkRequirements\\(\\) has parameter \\$config with no type specified\\.$#"
count: 1
Expand Down Expand Up @@ -2410,6 +2415,11 @@ parameters:
count: 1
path: ../../redaxo/src/addons/users/lib/select_element.php

-
message: "#^Parameter \\#1 \\$relPath of static method rex_path\\:\\:absolute\\(\\) expects non\\-empty\\-string, string given\\.$#"
count: 2
path: ../../redaxo/src/core/fragments/core/top.php

-
message: "#^Argument of an invalid type rex_api_result supplied for foreach, only iterables are supported\\.$#"
count: 1
Expand Down Expand Up @@ -2490,6 +2500,11 @@ parameters:
count: 1
path: ../../redaxo/src/core/lib/be/controller.php

-
message: "#^Parameter \\#1 \\$file of method rex_package_interface\\:\\:includeFile\\(\\) expects non\\-empty\\-string, string given\\.$#"
count: 1
path: ../../redaxo/src/core/lib/be/controller.php

-
message: "#^Method rex_be_navigation\\:\\:_getNavigation\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -2555,6 +2570,11 @@ parameters:
count: 1
path: ../../redaxo/src/core/lib/console/config/get.php

-
message: "#^Parameter \\#1 \\$key of method rex_package_interface\\:\\:getProperty\\(\\) expects non\\-empty\\-string, string given\\.$#"
count: 1
path: ../../redaxo/src/core/lib/console/config/get.php

-
message: "#^Method rex_command_config_set\\:\\:configure\\(\\) has no return type specified\\.$#"
count: 1
Expand All @@ -2570,6 +2590,11 @@ parameters:
count: 1
path: ../../redaxo/src/core/lib/console/db/dump_schema.php

-
message: "#^Parameter \\#1 \\$name of static method rex_sql_table\\:\\:get\\(\\) expects non\\-empty\\-string, string given\\.$#"
count: 1
path: ../../redaxo/src/core/lib/console/db/dump_schema.php

-
message: "#^Method rex_command_db_set_connection\\:\\:configure\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -2770,6 +2795,11 @@ parameters:
count: 1
path: ../../redaxo/src/core/lib/form/elements/prio.php

-
message: "#^Parameter \\#2 \\$prioColumnName of static method rex_sql_util\\:\\:organizePriorities\\(\\) expects non\\-empty\\-string, string given\\.$#"
count: 1
path: ../../redaxo/src/core/lib/form/elements/prio.php

-
message: "#^Method rex_form_select_element\\:\\:setSeparator\\(\\) has parameter \\$separator with no type specified\\.$#"
count: 1
Expand Down Expand Up @@ -3355,6 +3385,11 @@ parameters:
count: 1
path: ../../redaxo/src/core/lib/packages/addons/addon.php

-
message: "#^Property rex_addon\\:\\:\\$plugins \\(array\\<non\\-empty\\-string, rex_plugin\\>\\) does not accept non\\-empty\\-array\\<int\\|string, rex_plugin\\>\\.$#"
count: 1
path: ../../redaxo/src/core/lib/packages/addons/addon.php

-
message: "#^Method rex_package_interface\\:\\:getConfig\\(\\) has parameter \\$default with no type specified\\.$#"
count: 1
Expand Down Expand Up @@ -3400,6 +3435,11 @@ parameters:
count: 1
path: ../../redaxo/src/core/lib/packages/manager.php

-
message: "#^Method rex_package_manager\\:\\:readPackageFolder\\(\\) should return array\\<non\\-empty\\-string\\> but returns array\\<int, string\\>\\.$#"
count: 1
path: ../../redaxo/src/core/lib/packages/manager.php

-
message: "#^Method rex_package_manager\\:\\:setFactoryClass\\(\\) has parameter \\$subclass with generic class rex_package_manager but does not specify its types\\: T$#"
count: 1
Expand Down Expand Up @@ -3480,6 +3520,11 @@ parameters:
count: 1
path: ../../redaxo/src/core/lib/packages/package.php

-
message: "#^Parameter \\#1 \\$name of method rex_package\\:\\:__construct\\(\\) expects non\\-empty\\-string, string given\\.$#"
count: 1
path: ../../redaxo/src/core/lib/packages/plugins/plugin.php

-
message: "#^Method rex_request\\:\\:arrayKeyCast\\(\\) has parameter \\$haystack with no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -3510,6 +3555,11 @@ parameters:
count: 1
path: ../../redaxo/src/core/lib/rex.php

-
message: "#^Method rex\\:\\:getPackageConfig\\(\\) should return array\\<non\\-empty\\-string, array\\{install\\: bool, status\\: bool, plugins\\?\\: array\\<string, array\\{install\\: bool, status\\: bool\\}\\>\\}\\> but returns array\\.$#"
count: 1
path: ../../redaxo/src/core/lib/rex.php

-
message: "#^Method rex\\:\\:getVersionHash\\(\\) has parameter \\$path with no type specified\\.$#"
count: 1
Expand Down Expand Up @@ -4040,6 +4090,31 @@ parameters:
count: 1
path: ../../redaxo/src/core/lib/util/formatter.php

-
message: "#^Method rex_i18n\\:\\:getLanguage\\(\\) should return non\\-empty\\-string but returns string\\.$#"
count: 1
path: ../../redaxo/src/core/lib/util/i18n.php

-
message: "#^Method rex_i18n\\:\\:getMsg\\(\\) should return non\\-empty\\-string but returns string\\.$#"
count: 1
path: ../../redaxo/src/core/lib/util/i18n.php

-
message: "#^Method rex_i18n\\:\\:getMsgFallback\\(\\) should return non\\-empty\\-string but returns string\\.$#"
count: 1
path: ../../redaxo/src/core/lib/util/i18n.php

-
message: "#^Method rex_i18n\\:\\:translate\\(\\) should return non\\-empty\\-string but returns string\\.$#"
count: 2
path: ../../redaxo/src/core/lib/util/i18n.php

-
message: "#^Static property rex_i18n\\:\\:\\$msg \\(array\\<array\\<non\\-empty\\-string\\>\\>\\) does not accept non\\-empty\\-array\\<array\\<string\\>\\>\\.$#"
count: 1
path: ../../redaxo/src/core/lib/util/i18n.php

-
message: "#^Method rex_logger\\:\\:callFactoryClass\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#"
count: 1
Expand Down

0 comments on commit a22a183

Please sign in to comment.