fix PHP 8.1 limit
This commit is contained in:
parent
aa4af2e63a
commit
a8e840eca7
@ -32,7 +32,10 @@ class ActionsCleanersStack implements Countable, Iterator
|
||||
return isset($this->stack[$offset]);
|
||||
}
|
||||
|
||||
public function get(int $offset): ?ActionDescriptor
|
||||
/**
|
||||
* @return null|ActionDescriptor
|
||||
*/
|
||||
public function get(int $offset)
|
||||
{
|
||||
return $this->stack[$offset] ?? null;
|
||||
}
|
||||
@ -52,12 +55,20 @@ class ActionsCleanersStack implements Countable, Iterator
|
||||
reset($this->stack);
|
||||
}
|
||||
|
||||
public function current(): false|ActionDescriptor
|
||||
/**
|
||||
* @return false|ActionDescriptor
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function current()
|
||||
{
|
||||
return current($this->stack);
|
||||
}
|
||||
|
||||
public function key(): ?int
|
||||
/**
|
||||
* @return null|int
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function key()
|
||||
{
|
||||
return key($this->stack);
|
||||
}
|
||||
|
@ -56,12 +56,20 @@ class ActionsStack implements Countable, Iterator
|
||||
reset($this->stack);
|
||||
}
|
||||
|
||||
public function current(): false|ActionsCleanersStack
|
||||
/**
|
||||
* @return false|ActionsCleanersStack
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function current()
|
||||
{
|
||||
return current($this->stack);
|
||||
}
|
||||
|
||||
public function key(): ?string
|
||||
/**
|
||||
* return null|string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function key()
|
||||
{
|
||||
return key($this->stack);
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ abstract class CleanerParent
|
||||
*
|
||||
* @return null|ActionDescriptor The action descriptor
|
||||
*/
|
||||
final public function get(string $id): ?ActionDescriptor
|
||||
final public function get(string $id)
|
||||
{
|
||||
return $this->actions[$id] ?? null;
|
||||
}
|
||||
|
@ -43,7 +43,10 @@ class CleanersStack implements Countable, Iterator
|
||||
return isset($this->stack[$offset]);
|
||||
}
|
||||
|
||||
public function get(string $offset): ?CleanerParent
|
||||
/**
|
||||
* @return null|CleanerParent
|
||||
*/
|
||||
public function get(string $offset)
|
||||
{
|
||||
return $this->stack[$offset] ?? null;
|
||||
}
|
||||
@ -67,12 +70,20 @@ class CleanersStack implements Countable, Iterator
|
||||
reset($this->stack);
|
||||
}
|
||||
|
||||
public function current(): false|CleanerParent
|
||||
/**
|
||||
* @return false|CleanerParent
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function current()
|
||||
{
|
||||
return current($this->stack);
|
||||
}
|
||||
|
||||
public function key(): ?string
|
||||
/**
|
||||
* @return null|string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function key()
|
||||
{
|
||||
return key($this->stack);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ trait DirTrait
|
||||
/**
|
||||
* Get excuded files.
|
||||
*
|
||||
* @param array<int,string> The excluded files
|
||||
* @return array<int,string> The excluded files
|
||||
*/
|
||||
public static function getExcluded(): array
|
||||
{
|
||||
|
@ -264,7 +264,7 @@ class Uninstaller
|
||||
*
|
||||
* @return null|ActionDescriptor The action description
|
||||
*/
|
||||
private function addAction(string $cleaner, string $action, string $ns, ?bool $default): ?ActionDescriptor
|
||||
private function addAction(string $cleaner, string $action, string $ns, ?bool $default)
|
||||
{
|
||||
// no current module or no cleaner id or no ns or unknown cleaner action
|
||||
if (null === $this->module
|
||||
|
Loading…
Reference in New Issue
Block a user