Skip to content

Commit 475cc74

Browse files
committed
Update phpstan to 2.1.50
1 parent 4dc68bf commit 475cc74

12 files changed

Lines changed: 282 additions & 33 deletions

composer.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpstan-baseline.neon

Lines changed: 273 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ parameters:
667667
path: wcfsetup/install/files/lib/system/form/builder/field/acl/AclFormField.class.php
668668

669669
-
670-
message: '#^Instanceof between wcf\\data\\DatabaseObjectList<wcf\\data\\DatabaseObject> and wcf\\data\\DatabaseObjectList will always evaluate to true\.$#'
670+
message: '#^Instanceof between wcf\\data\\DatabaseObjectList\<wcf\\data\\DatabaseObject\> and wcf\\data\\DatabaseObjectList will always evaluate to true\.$#'
671671
identifier: instanceof.alwaysTrue
672672
count: 1
673673
path: wcfsetup/install/files/lib/system/form/builder/field/dependency/ValueFormFieldDependency.class.php
@@ -738,6 +738,24 @@ parameters:
738738
count: 1
739739
path: wcfsetup/install/files/lib/system/form/element/MultipleSelectionFormElement.class.php
740740

741+
-
742+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
743+
identifier: function.alreadyNarrowedType
744+
count: 1
745+
path: wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeWoltlabMetacodeMarker.class.php
746+
747+
-
748+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
749+
identifier: notIdentical.alwaysTrue
750+
count: 1
751+
path: wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeWoltlabMetacodeMarker.class.php
752+
753+
-
754+
message: '#^Strict comparison using \!\=\= between "PK\\005\\006" and "PK\\001\\002" will always evaluate to true\.$#'
755+
identifier: notIdentical.alwaysTrue
756+
count: 1
757+
path: wcfsetup/install/files/lib/system/io/Zip.class.php
758+
741759
-
742760
message: '#^Strict comparison using \=\=\= between "PK\\001\\002" and "PK\\001\\002" will always evaluate to true\.$#'
743761
identifier: identical.alwaysTrue
@@ -753,7 +771,7 @@ parameters:
753771
-
754772
message: '#^Unreachable statement \- code above always terminates\.$#'
755773
identifier: deadCode.unreachable
756-
count: 1
774+
count: 2
757775
path: wcfsetup/install/files/lib/system/io/Zip.class.php
758776

759777
-
@@ -763,7 +781,7 @@ parameters:
763781
path: wcfsetup/install/files/lib/system/label/object/AbstractLabelObjectHandler.class.php
764782

765783
-
766-
message: '#^Call to an undefined method wcf\\data\\DatabaseObjectList<wcf\\data\\DatabaseObject>\:\:getAttachmentList\(\)\.$#'
784+
message: '#^Call to an undefined method wcf\\data\\DatabaseObjectList\<wcf\\data\\DatabaseObject\>\:\:getAttachmentList\(\)\.$#'
767785
identifier: method.notFound
768786
count: 1
769787
path: wcfsetup/install/files/lib/system/message/QuickReplyManager.class.php
@@ -810,12 +828,240 @@ parameters:
810828
count: 2
811829
path: wcfsetup/install/files/lib/system/package/plugin/ACPMenuPackageInstallationPlugin.class.php
812830

831+
-
832+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
833+
identifier: function.alreadyNarrowedType
834+
count: 1
835+
path: wcfsetup/install/files/lib/system/package/plugin/ACPSearchProviderPackageInstallationPlugin.class.php
836+
837+
-
838+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
839+
identifier: notIdentical.alwaysTrue
840+
count: 1
841+
path: wcfsetup/install/files/lib/system/package/plugin/ACPSearchProviderPackageInstallationPlugin.class.php
842+
843+
-
844+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
845+
identifier: function.alreadyNarrowedType
846+
count: 1
847+
path: wcfsetup/install/files/lib/system/package/plugin/AbstractMenuPackageInstallationPlugin.class.php
848+
849+
-
850+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
851+
identifier: notIdentical.alwaysTrue
852+
count: 1
853+
path: wcfsetup/install/files/lib/system/package/plugin/AbstractMenuPackageInstallationPlugin.class.php
854+
855+
-
856+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
857+
identifier: function.alreadyNarrowedType
858+
count: 1
859+
path: wcfsetup/install/files/lib/system/package/plugin/AbstractOptionPackageInstallationPlugin.class.php
860+
861+
-
862+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
863+
identifier: notIdentical.alwaysTrue
864+
count: 1
865+
path: wcfsetup/install/files/lib/system/package/plugin/AbstractOptionPackageInstallationPlugin.class.php
866+
867+
-
868+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
869+
identifier: function.alreadyNarrowedType
870+
count: 1
871+
path: wcfsetup/install/files/lib/system/package/plugin/BBCodePackageInstallationPlugin.class.php
872+
873+
-
874+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
875+
identifier: notIdentical.alwaysTrue
876+
count: 1
877+
path: wcfsetup/install/files/lib/system/package/plugin/BBCodePackageInstallationPlugin.class.php
878+
879+
-
880+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
881+
identifier: function.alreadyNarrowedType
882+
count: 1
883+
path: wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php
884+
885+
-
886+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
887+
identifier: notIdentical.alwaysTrue
888+
count: 1
889+
path: wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php
890+
891+
-
892+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
893+
identifier: function.alreadyNarrowedType
894+
count: 1
895+
path: wcfsetup/install/files/lib/system/package/plugin/ClipboardActionPackageInstallationPlugin.class.php
896+
897+
-
898+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
899+
identifier: notIdentical.alwaysTrue
900+
count: 1
901+
path: wcfsetup/install/files/lib/system/package/plugin/ClipboardActionPackageInstallationPlugin.class.php
902+
903+
-
904+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
905+
identifier: function.alreadyNarrowedType
906+
count: 1
907+
path: wcfsetup/install/files/lib/system/package/plugin/CoreObjectPackageInstallationPlugin.class.php
908+
909+
-
910+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
911+
identifier: notIdentical.alwaysTrue
912+
count: 1
913+
path: wcfsetup/install/files/lib/system/package/plugin/CoreObjectPackageInstallationPlugin.class.php
914+
915+
-
916+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
917+
identifier: function.alreadyNarrowedType
918+
count: 1
919+
path: wcfsetup/install/files/lib/system/package/plugin/CronjobPackageInstallationPlugin.class.php
920+
921+
-
922+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
923+
identifier: notIdentical.alwaysTrue
924+
count: 1
925+
path: wcfsetup/install/files/lib/system/package/plugin/CronjobPackageInstallationPlugin.class.php
926+
927+
-
928+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
929+
identifier: function.alreadyNarrowedType
930+
count: 1
931+
path: wcfsetup/install/files/lib/system/package/plugin/EventListenerPackageInstallationPlugin.class.php
932+
933+
-
934+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
935+
identifier: notIdentical.alwaysTrue
936+
count: 1
937+
path: wcfsetup/install/files/lib/system/package/plugin/EventListenerPackageInstallationPlugin.class.php
938+
939+
-
940+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
941+
identifier: function.alreadyNarrowedType
942+
count: 1
943+
path: wcfsetup/install/files/lib/system/package/plugin/LanguagePackageInstallationPlugin.class.php
944+
813945
-
814946
message: '#^Method wcf\\system\\package\\plugin\\LanguagePackageInstallationPlugin\:\:getEmptyXml\(\) invoked with 0 parameters, 1 required\.$#'
815947
identifier: arguments.count
816948
count: 1
817949
path: wcfsetup/install/files/lib/system/package/plugin/LanguagePackageInstallationPlugin.class.php
818950

951+
-
952+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
953+
identifier: notIdentical.alwaysTrue
954+
count: 1
955+
path: wcfsetup/install/files/lib/system/package/plugin/LanguagePackageInstallationPlugin.class.php
956+
957+
-
958+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
959+
identifier: function.alreadyNarrowedType
960+
count: 1
961+
path: wcfsetup/install/files/lib/system/package/plugin/MediaProviderPackageInstallationPlugin.class.php
962+
963+
-
964+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
965+
identifier: notIdentical.alwaysTrue
966+
count: 1
967+
path: wcfsetup/install/files/lib/system/package/plugin/MediaProviderPackageInstallationPlugin.class.php
968+
969+
-
970+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
971+
identifier: function.alreadyNarrowedType
972+
count: 1
973+
path: wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php
974+
975+
-
976+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
977+
identifier: notIdentical.alwaysTrue
978+
count: 1
979+
path: wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php
980+
981+
-
982+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
983+
identifier: function.alreadyNarrowedType
984+
count: 1
985+
path: wcfsetup/install/files/lib/system/package/plugin/MenuPackageInstallationPlugin.class.php
986+
987+
-
988+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
989+
identifier: notIdentical.alwaysTrue
990+
count: 1
991+
path: wcfsetup/install/files/lib/system/package/plugin/MenuPackageInstallationPlugin.class.php
992+
993+
-
994+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
995+
identifier: function.alreadyNarrowedType
996+
count: 1
997+
path: wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php
998+
999+
-
1000+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
1001+
identifier: notIdentical.alwaysTrue
1002+
count: 1
1003+
path: wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php
1004+
1005+
-
1006+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
1007+
identifier: function.alreadyNarrowedType
1008+
count: 1
1009+
path: wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php
1010+
1011+
-
1012+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
1013+
identifier: notIdentical.alwaysTrue
1014+
count: 1
1015+
path: wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php
1016+
1017+
-
1018+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
1019+
identifier: function.alreadyNarrowedType
1020+
count: 1
1021+
path: wcfsetup/install/files/lib/system/package/plugin/PIPPackageInstallationPlugin.class.php
1022+
1023+
-
1024+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
1025+
identifier: notIdentical.alwaysTrue
1026+
count: 1
1027+
path: wcfsetup/install/files/lib/system/package/plugin/PIPPackageInstallationPlugin.class.php
1028+
1029+
-
1030+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
1031+
identifier: function.alreadyNarrowedType
1032+
count: 1
1033+
path: wcfsetup/install/files/lib/system/package/plugin/PagePackageInstallationPlugin.class.php
1034+
1035+
-
1036+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
1037+
identifier: notIdentical.alwaysTrue
1038+
count: 1
1039+
path: wcfsetup/install/files/lib/system/package/plugin/PagePackageInstallationPlugin.class.php
1040+
1041+
-
1042+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
1043+
identifier: function.alreadyNarrowedType
1044+
count: 1
1045+
path: wcfsetup/install/files/lib/system/package/plugin/SmileyPackageInstallationPlugin.class.php
1046+
1047+
-
1048+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
1049+
identifier: notIdentical.alwaysTrue
1050+
count: 1
1051+
path: wcfsetup/install/files/lib/system/package/plugin/SmileyPackageInstallationPlugin.class.php
1052+
1053+
-
1054+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
1055+
identifier: function.alreadyNarrowedType
1056+
count: 1
1057+
path: wcfsetup/install/files/lib/system/package/plugin/TemplateListenerPackageInstallationPlugin.class.php
1058+
1059+
-
1060+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
1061+
identifier: notIdentical.alwaysTrue
1062+
count: 1
1063+
path: wcfsetup/install/files/lib/system/package/plugin/TemplateListenerPackageInstallationPlugin.class.php
1064+
8191065
-
8201066
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
8211067
identifier: function.alreadyNarrowedType
@@ -828,6 +1074,30 @@ parameters:
8281074
count: 2
8291075
path: wcfsetup/install/files/lib/system/package/plugin/UserMenuPackageInstallationPlugin.class.php
8301076

1077+
-
1078+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
1079+
identifier: function.alreadyNarrowedType
1080+
count: 1
1081+
path: wcfsetup/install/files/lib/system/package/plugin/UserNotificationEventPackageInstallationPlugin.class.php
1082+
1083+
-
1084+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
1085+
identifier: notIdentical.alwaysTrue
1086+
count: 1
1087+
path: wcfsetup/install/files/lib/system/package/plugin/UserNotificationEventPackageInstallationPlugin.class.php
1088+
1089+
-
1090+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
1091+
identifier: function.alreadyNarrowedType
1092+
count: 1
1093+
path: wcfsetup/install/files/lib/system/package/plugin/UserProfileMenuPackageInstallationPlugin.class.php
1094+
1095+
-
1096+
message: '#^Strict comparison using \!\=\= between DOMElement and false will always evaluate to true\.$#'
1097+
identifier: notIdentical.alwaysTrue
1098+
count: 1
1099+
path: wcfsetup/install/files/lib/system/package/plugin/UserProfileMenuPackageInstallationPlugin.class.php
1100+
8311101
-
8321102
message: '#^Call to function is_bool\(\) with string will always evaluate to false\.$#'
8331103
identifier: function.impossibleType

wcfsetup/install/files/lib/acp/form/CategoryAddFormBuilderForm.class.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ abstract class CategoryAddFormBuilderForm extends AbstractFormBuilderForm
8484

8585
/**
8686
* language item with the page title
87+
* @deprecated 6.3 No longer in use.
8788
*/
8889
public string $pageTitle = 'wcf.category.add';
8990

@@ -383,18 +384,6 @@ public function assignVariables()
383384
{
384385
parent::assignVariables();
385386

386-
if (!isset($this->pageTitle)) {
387-
switch ($this->formAction) {
388-
case 'create':
389-
$this->pageTitle = 'wcf.category.add';
390-
break;
391-
392-
case 'edit':
393-
$this->pageTitle = 'wcf.category.edit';
394-
break;
395-
}
396-
}
397-
398387
$categoryNodeTree = new UncachedCategoryNodeTree($this->objectType->objectType, 0, true);
399388

400389
WCF::getTPL()->assign([
@@ -403,7 +392,6 @@ public function assignVariables()
403392
'listController' => $this->listController,
404393
'objectType' => $this->objectType,
405394
'categoryNodeList' => $categoryNodeTree->getIterator(),
406-
'pageTitle' => $this->pageTitle,
407395
]);
408396
}
409397

wcfsetup/install/files/lib/action/GridViewFilterAction.class.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public function handle(ServerRequestInterface $request): ResponseInterface
4848
try {
4949
/** @var AbstractGridView<DatabaseObject, DatabaseObjectList<DatabaseObject>> $view */
5050
$view = new $parameters['gridView'](...$parameters['gridViewParameters']);
51-
// @phpstan-ignore catch.neverThrown
5251
} catch (\ArgumentCountError $e) {
5352
if (\ENABLE_DEBUG_MODE) {
5453
throw $e;

wcfsetup/install/files/lib/action/ListViewFilterAction.class.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public function handle(ServerRequestInterface $request): ResponseInterface
4848
try {
4949
/** @var AbstractListView<DatabaseObject, DatabaseObjectList<DatabaseObject>> $view */
5050
$view = new $parameters['listView'](...$parameters['listViewParameters']);
51-
// @phpstan-ignore catch.neverThrown
5251
} catch (\ArgumentCountError $e) {
5352
if (\ENABLE_DEBUG_MODE) {
5453
throw $e;

0 commit comments

Comments
 (0)