@@ -99,28 +99,28 @@ abstract class GenerateCommand extends Command
9999 * The parent of the generated class, or interfaces extended by the
100100 * generated interface
101101 *
102- * @var class- string[]
102+ * @var string[]
103103 */
104104 protected array $ Extends = [];
105105
106106 /**
107107 * Interfaces implemented by the generated class
108108 *
109- * @var class- string[]
109+ * @var string[]
110110 */
111111 protected array $ Implements = [];
112112
113113 /**
114114 * Traits used by the generated class
115115 *
116- * @var class- string[]
116+ * @var string[]
117117 */
118118 protected array $ Uses = [];
119119
120120 /**
121121 * Modifiers applied to the generated class
122122 *
123- * @var class- string[]
123+ * @var string[]
124124 */
125125 protected array $ Modifiers = [];
126126
@@ -486,11 +486,14 @@ function ($match) use (
486486 * Convert a built-in or user-defined type to a code-safe identifier, using
487487 * the same alias as the declaring class if possible
488488 *
489+ * @template TReturnFqcn of bool
490+ *
489491 * @param string $type Either a built-in type (e.g. `bool`) or a FQCN.
490492 * @param string|null $filename File where `$type` is declared (if
491493 * applicable).
492- * @param bool $returnFqcn If `false`, return `null` instead of `$type` if
493- * the alias has already been claimed.
494+ * @param TReturnFqcn $returnFqcn If `false`, return `null` instead of
495+ * `$type` if the alias has already been claimed.
496+ * @return (TReturnFqcn is true ? string : string|null)
494497 */
495498 protected function getTypeAlias (string $ type , ?string $ filename = null , bool $ returnFqcn = true ): ?string
496499 {
@@ -516,10 +519,13 @@ protected function getTypeAlias(string $type, ?string $filename = null, bool $re
516519 * Otherwise, `use $fqcn[ as $alias];` will be queued for output and
517520 * `$alias` will be returned.
518521 *
522+ * @template TReturnFqcn of bool
523+ *
519524 * @param string|null $alias If `null`, the basename of `$fqcn` will be
520525 * used.
521- * @param bool $returnFqcn If `false`, return `null` instead of the FQCN if
522- * `$alias` has already been claimed.
526+ * @param TReturnFqcn $returnFqcn If `false`, return `null` instead of the
527+ * FQCN if `$alias` has already been claimed.
528+ * @return (TReturnFqcn is true ? string : string|null)
523529 */
524530 protected function getFqcnAlias (string $ fqcn , ?string $ alias = null , bool $ returnFqcn = true ): ?string
525531 {
@@ -669,7 +675,7 @@ protected function generateImports(): array
669675 /**
670676 * Get an array that maps imports to aliases
671677 *
672- * @return array<class-string,string|null >
678+ * @return array<class-string,string>
673679 */
674680 protected function getImportMap (bool $ sort = true ): array
675681 {
0 commit comments