From b99e21259c09a6da2614f286b7ad548fec8036a0 Mon Sep 17 00:00:00 2001 From: pistej Date: Wed, 20 Oct 2021 22:20:33 +0200 Subject: [PATCH] phpstan level 6 in src/Composer/Package/Comparer (refs #10159) (#10196) --- src/Composer/Package/Comparer/Comparer.php | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/Composer/Package/Comparer/Comparer.php b/src/Composer/Package/Comparer/Comparer.php index be23bedf6..06ebf7daa 100644 --- a/src/Composer/Package/Comparer/Comparer.php +++ b/src/Composer/Package/Comparer/Comparer.php @@ -26,16 +26,32 @@ class Comparer /** @var array{changed?: string[], removed?: string[], added?: string[]} */ private $changed; + /** + * @param string $source + * + * @return void + */ public function setSource($source) { $this->source = $source; } + /** + * @param string $update + * + * @return void + */ public function setUpdate($update) { $this->update = $update; } + /** + * @param bool $toString + * @param bool $explicated + * + * @return array{changed?: string[], removed?: string[], added?: string[]}|string|false false if no change, string only if $toString is true + */ public function getChanged($toString = false, $explicated = false) { $changed = $this->changed; @@ -62,6 +78,9 @@ class Comparer return $changed; } + /** + * @return void + */ public function doCompare() { $source = array(); @@ -100,6 +119,12 @@ class Comparer } } + /** + * @param string $dir + * @param mixed $array + * + * @return array>|false + */ private function doTree($dir, &$array) { if ($dh = opendir($dir)) {