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 1deff41 commit c73bbabCopy full SHA for c73bbab
src/Mapper/OutdatedPackageMapper.php
@@ -5,7 +5,6 @@
5
namespace Rector\Jack\Mapper;
6
7
use Rector\Jack\ValueObject\OutdatedPackage;
8
-use Webmozart\Assert\Assert;
9
10
final class OutdatedPackageMapper
11
{
@@ -62,11 +61,12 @@ private function parseComposerJsonToJson(string $composerJsonFilePath): array
62
61
63
// use native functions to ease re-use by 3rd party packages
64
$composerJsonContents = file_get_contents($composerJsonFilePath);
65
- Assert::string($composerJsonContents);
+ if (! is_string($composerJsonContents)) {
+ return [];
66
+ }
67
68
$composerJson = (array) json_decode($composerJsonContents, true);
69
-
70
$this->cachedComposerJson[$composerJsonFilePath] = $composerJson;
71
72
return $composerJson;
0 commit comments