diff --git a/bin/composer-require-checker-config.json b/bin/composer-require-checker-config.json index 268cf8c735d..753f91dd159 100644 --- a/bin/composer-require-checker-config.json +++ b/bin/composer-require-checker-config.json @@ -4,7 +4,8 @@ "static", "self", "parent", "array", "string", "int", "float", "bool", "iterable", "callable", "void", "object", "igbinary_serialize", "igbinary_unserialize", "PHP_PARSER_VERSION", "PSALM_VERSION", "runkit_object_id", - "sapi_windows_cp_is_utf8", "ReflectionUnionType" + "sapi_windows_cp_is_utf8", "ReflectionUnionType", + "Composer\\Autoload\\ClassLoader" ], "php-core-extensions" : [ "Core", diff --git a/src/Psalm/Config.php b/src/Psalm/Config.php index 4f8a7e104fb..850303fd530 100644 --- a/src/Psalm/Config.php +++ b/src/Psalm/Config.php @@ -7,7 +7,7 @@ use Composer\Semver\VersionParser; use DOMAttr; use DOMDocument; -use DomElement; +use DOMElement; use InvalidArgumentException; use JsonException; use LogicException; @@ -764,7 +764,6 @@ private static function validateXmlConfig(string $base_dir, string $file_content $psalm_nodes = $dom_document->getElementsByTagName('psalm'); - /** @var DomElement|null */ $psalm_node = $psalm_nodes->item(0); if (!$psalm_node) { @@ -853,7 +852,7 @@ private static function processDeprecatedAttribute( } private static function processDeprecatedElement( - DomElement $deprecated_element_xml, + DOMElement $deprecated_element_xml, string $file_contents, self $config, string $config_path diff --git a/src/Psalm/Internal/PluginManager/ConfigFile.php b/src/Psalm/Internal/PluginManager/ConfigFile.php index 82a21354bd4..0fed0fe7987 100644 --- a/src/Psalm/Internal/PluginManager/ConfigFile.php +++ b/src/Psalm/Internal/PluginManager/ConfigFile.php @@ -3,7 +3,7 @@ namespace Psalm\Internal\PluginManager; use DOMDocument; -use DomElement; +use DOMElement; use Psalm\Config; use RuntimeException; @@ -53,7 +53,7 @@ public function getConfig(): Config public function removePlugin(string $plugin_class): void { $config_xml = $this->readXml(); - /** @var DomElement */ + /** @var DOMElement */ $psalm_root = $config_xml->getElementsByTagName('psalm')[0]; $plugins_elements = $psalm_root->getElementsByTagName('plugins'); if (!$plugins_elements->length) { @@ -61,7 +61,7 @@ public function removePlugin(string $plugin_class): void return; } - /** @var DomElement */ + /** @var DOMElement */ $plugins_element = $plugins_elements->item(0); $plugin_elements = $plugins_element->getElementsByTagName('pluginClass'); @@ -84,7 +84,7 @@ public function removePlugin(string $plugin_class): void public function addPlugin(string $plugin_class): void { $config_xml = $this->readXml(); - /** @var DomElement */ + /** @var DOMElement */ $psalm_root = $config_xml->getElementsByTagName('psalm')->item(0); $plugins_elements = $psalm_root->getElementsByTagName('plugins'); if (!$plugins_elements->length) { @@ -93,7 +93,7 @@ public function addPlugin(string $plugin_class): void $psalm_root->appendChild($plugins_element); } } else { - /** @var DomElement */ + /** @var DOMElement */ $plugins_element = $plugins_elements->item(0); }