diff --git a/src/Psalm/Codebase.php b/src/Psalm/Codebase.php index 1cf0da5d0..fbdc04ba0 100644 --- a/src/Psalm/Codebase.php +++ b/src/Psalm/Codebase.php @@ -183,11 +183,9 @@ class Codebase $this->classlikes = new Codebase\ClassLikes( $this->config, - $this, $providers->classlike_storage_provider, $this->scanner, - $this->methods, - $this->debug_output + $this->methods ); $this->populator = new Codebase\Populator( $config, diff --git a/src/Psalm/Codebase/ClassLikes.php b/src/Psalm/Codebase/ClassLikes.php index 2290f0938..99e700f92 100644 --- a/src/Psalm/Codebase/ClassLikes.php +++ b/src/Psalm/Codebase/ClassLikes.php @@ -26,11 +26,6 @@ use ReflectionProperty; */ class ClassLikes { - /** - * @var Codebase - */ - private $codebase; - /** * @var ClassLikeStorageProvider */ @@ -106,28 +101,19 @@ class ClassLikes */ private $scanner; - /** - * @var bool - */ - private $debug_output; - /** * @param bool $debug_output */ public function __construct( Config $config, - Codebase $codebase, ClassLikeStorageProvider $storage_provider, Scanner $scanner, - Methods $methods, - $debug_output + Methods $methods ) { $this->config = $config; $this->classlike_storage_provider = $storage_provider; $this->scanner = $scanner; - $this->debug_output = $debug_output; $this->methods = $methods; - $this->codebase = $codebase; $this->collectPredefinedClassLikes(); } diff --git a/src/Psalm/Provider/ParserCacheProvider.php b/src/Psalm/Provider/ParserCacheProvider.php index bd8598e3e..2939468f6 100644 --- a/src/Psalm/Provider/ParserCacheProvider.php +++ b/src/Psalm/Provider/ParserCacheProvider.php @@ -19,7 +19,7 @@ class ParserCacheProvider /** * A map of filename hashes to contents hashes * - * @var array|null + * @var array */ protected $file_content_hashes = []; @@ -133,17 +133,20 @@ class ParserCacheProvider $hashes_encoded = (string) file_get_contents($file_hashes_path); if (!$hashes_encoded) { - return $this->file_content_hashes; error_log('Unexpected value when loading from file content hashes'); + + return $this->file_content_hashes; } + /** @psalm-suppress MixedAssignment */ $hashes_decoded = json_decode($hashes_encoded, true); if (!is_array($hashes_decoded)) { - return $this->file_content_hashes; error_log('Unexpected value ' . gettype($hashes_decoded)); + return $this->file_content_hashes; } + /** @var array $hashes_decoded */ $this->file_content_hashes = $hashes_decoded; } }