Skip to content

Commit

Permalink
simplify syntax with null-safe-operator (@see https://php.watch/versi…
Browse files Browse the repository at this point in the history
  • Loading branch information
llaville committed Jul 30, 2024
1 parent f33bc49 commit 57629c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Composer/ManifestFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static function create(string|object $from, Configuration $config, bool $
return null;
}

$decodedJsonContents = $config->getComposerJson() ? $config->getComposerJson()->decodedContents : null;
$decodedJsonContents = $config->getComposerJson()?->decodedContents;

$normalizePath = function ($file, $basePath) {
return ($basePath . DIRECTORY_SEPARATOR . trim($file));
Expand All @@ -103,7 +103,7 @@ public static function create(string|object $from, Configuration $config, bool $
}
$installedPhp = include $file;

$decodedJsonLockContents = $config->getComposerLock() ? $config->getComposerLock()->decodedContents : null;
$decodedJsonLockContents = $config->getComposerLock()?->decodedContents;

$manifest = $builder(
[
Expand Down

0 comments on commit 57629c3

Please sign in to comment.