We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 599b0e7 commit 1deff41Copy full SHA for 1deff41
src/Mapper/OutdatedPackageMapper.php
@@ -5,6 +5,7 @@
5
namespace Rector\Jack\Mapper;
6
7
use Rector\Jack\ValueObject\OutdatedPackage;
8
+use Webmozart\Assert\Assert;
9
10
final class OutdatedPackageMapper
11
{
@@ -61,9 +62,11 @@ private function parseComposerJsonToJson(string $composerJsonFilePath): array
61
62
63
// use native functions to ease re-use by 3rd party packages
64
$composerJsonContents = file_get_contents($composerJsonFilePath);
65
+ Assert::string($composerJsonContents);
66
67
$composerJson = (array) json_decode($composerJsonContents, true);
68
69
+
70
$this->cachedComposerJson[$composerJsonFilePath] = $composerJson;
71
72
return $composerJson;
0 commit comments