Skip to content

Commit

Permalink
Fix Psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzap committed May 29, 2023
1 parent a8597ef commit c99bae4
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/Asset/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,9 @@ public static function forComposerPackage(
array $rootEnv = []
): Config {

$configFile = null;
if (is_string($path)) {
$path = $filesystem->normalizePath($path);
$configFile = "{$path}/" . self::CONFIG_FILE;
file_exists($configFile) or $configFile = null;
}

$raw = $configFile
$path = $filesystem->normalizePath($path);
$configFile = "{$path}/" . self::CONFIG_FILE;
$raw = file_exists($configFile)
? JsonFile::parseJson(file_get_contents($configFile) ?: '')
: $package->getExtra()[self::EXTRA_KEY] ?? [];

Expand Down

0 comments on commit c99bae4

Please sign in to comment.