diff --git a/src/Compile/Base.php b/src/Compile/Base.php index b8d6c9b2c..33e8732e6 100644 --- a/src/Compile/Base.php +++ b/src/Compile/Base.php @@ -72,11 +72,11 @@ protected function formatParamsArray(array $_attr): array { /** * Returns attribute index for unnamed ("shorthand") attribute, or null if not allowed. * - * @param int $key + * @param string|int|null $key Index of the argument. Type should probably be narrowed to int * * @return string|int|null */ - protected function getShorthandOrder(int $key) { + protected function getShorthandOrder(mixed $key) { return $this->shorttag_order[$key] ?? null; } diff --git a/src/Compile/Tag/BCPluginWrapper.php b/src/Compile/Tag/BCPluginWrapper.php index dfb174644..09e985350 100644 --- a/src/Compile/Tag/BCPluginWrapper.php +++ b/src/Compile/Tag/BCPluginWrapper.php @@ -27,11 +27,11 @@ public function __construct($callback, bool $cacheable = true) { * For compiler plugins, we allow arbitrarily many unnamed attributes, * and just make them accessible in the order they are set. * - * @param int $key + * @param string|int|null $key Index of the argument. Type should probably be narrowed to int * - * @return int + * @return string|int|null */ - protected function getShorthandOrder(int $key): int { + protected function getShorthandOrder(mixed $key) { return $key; }