docs: Fix Doxygen parsing of @var descriptions with $var names
[lhc/web/wiklou.git] / tests / phpunit / maintenance / MWDoxygenFilterTest.php
index 2e06d6f..22b5938 100644 (file)
@@ -45,6 +45,21 @@ CODE
 CODE
                ];
 
+               yield 'One-line var with type and description that starts like a variable name' => [
+                       <<<'CODE'
+<?php class MyClass {
+       /** @var array $_GET data from some thing */
+       protected $name;
+}
+CODE
+                       , <<<'CODE'
+<?php class MyClass {
+       /**  $_GET data from some thing */
+       protected array $name;
+}
+CODE
+               ];
+
                yield 'One-line var with type, name, and description' => [
                        // In this full form, Doxygen understands it just fine.
                        // No changes made.