From 64a0f1b56ef50b52024c7b569f409f18ee6bd7b6 Mon Sep 17 00:00:00 2001 From: Gemorroj Date: Wed, 15 Jul 2020 17:00:33 +0300 Subject: [PATCH 1/2] use static construction for static method --- src/Unpacker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unpacker.php b/src/Unpacker.php index 524c0639e..545379588 100644 --- a/src/Unpacker.php +++ b/src/Unpacker.php @@ -135,7 +135,7 @@ public function updateLock(Result $result, IOInterface $io): void } $lockData['packages'] = array_values($lockData['packages']); $lockData['packages-dev'] = array_values($lockData['packages-dev']); - $lockData['content-hash'] = $locker->getContentHash(file_get_contents($json->getPath())); + $lockData['content-hash'] = Locker::getContentHash(file_get_contents($json->getPath())); $lockFile = new JsonFile(substr($json->getPath(), 0, -4).'lock', null, $io); if (!$this->dryRun) { From a6202403f20c2f5cb81712ef6e1613015d999496 Mon Sep 17 00:00:00 2001 From: Gemorroj Date: Wed, 15 Jul 2020 17:11:45 +0300 Subject: [PATCH 2/2] use static construction for static method --- src/Unpacker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unpacker.php b/src/Unpacker.php index ac7a270d5..9ae15bea8 100644 --- a/src/Unpacker.php +++ b/src/Unpacker.php @@ -136,7 +136,7 @@ public function updateLock(Result $result, IOInterface $io): void $jsonContent = file_get_contents($json->getPath()); $lockData['packages'] = array_values($lockData['packages']); $lockData['packages-dev'] = array_values($lockData['packages-dev']); - $lockData['content-hash'] = $locker->getContentHash($jsonContent); + $lockData['content-hash'] = Locker::getContentHash($jsonContent); $lockFile = new JsonFile(substr($json->getPath(), 0, -4).'lock', null, $io); if (!$this->dryRun) {