diff --git a/src/ActionsCleanersStack.php b/src/ActionsCleanersStack.php index 35c6b3a..4c2bc54 100644 --- a/src/ActionsCleanersStack.php +++ b/src/ActionsCleanersStack.php @@ -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); } diff --git a/src/ActionsStack.php b/src/ActionsStack.php index 1a1e1d2..daea9cd 100644 --- a/src/ActionsStack.php +++ b/src/ActionsStack.php @@ -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); } diff --git a/src/CleanerParent.php b/src/CleanerParent.php index de5724c..12aa15d 100644 --- a/src/CleanerParent.php +++ b/src/CleanerParent.php @@ -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; } diff --git a/src/CleanersStack.php b/src/CleanersStack.php index 7ff3343..e572545 100644 --- a/src/CleanersStack.php +++ b/src/CleanersStack.php @@ -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); } diff --git a/src/Helper/DirTrait.php b/src/Helper/DirTrait.php index 451456c..f6b71c6 100644 --- a/src/Helper/DirTrait.php +++ b/src/Helper/DirTrait.php @@ -25,7 +25,7 @@ trait DirTrait /** * Get excuded files. * - * @param array The excluded files + * @return array The excluded files */ public static function getExcluded(): array { diff --git a/src/Uninstaller.php b/src/Uninstaller.php index c4ef2a1..e4841e1 100644 --- a/src/Uninstaller.php +++ b/src/Uninstaller.php @@ -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