Skip to content

Commit c73bbab

Browse files
committed
sc
1 parent 1deff41 commit c73bbab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Mapper/OutdatedPackageMapper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Rector\Jack\Mapper;
66

77
use Rector\Jack\ValueObject\OutdatedPackage;
8-
use Webmozart\Assert\Assert;
98

109
final class OutdatedPackageMapper
1110
{
@@ -62,11 +61,12 @@ private function parseComposerJsonToJson(string $composerJsonFilePath): array
6261

6362
// use native functions to ease re-use by 3rd party packages
6463
$composerJsonContents = file_get_contents($composerJsonFilePath);
65-
Assert::string($composerJsonContents);
64+
if (! is_string($composerJsonContents)) {
65+
return [];
66+
}
6667

6768
$composerJson = (array) json_decode($composerJsonContents, true);
6869

69-
7070
$this->cachedComposerJson[$composerJsonFilePath] = $composerJson;
7171

7272
return $composerJson;

0 commit comments

Comments
 (0)