Skip to content

Commit 550f5a5

Browse files
Remove always true/false occurrences
1 parent 887061a commit 550f5a5

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Compiler/MergeExtensionConfigurationPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function resolveEnvPlaceholders(mixed $value, string|bool|null $format =
193193
$value = $bag->resolveValue($value);
194194

195195
if (!$bag instanceof EnvPlaceholderParameterBag) {
196-
return parent::resolveEnvPlaceholders($value, $format, $usedEnvs);
196+
return parent::resolveEnvPlaceholders($value, true, $usedEnvs);
197197
}
198198

199199
foreach ($bag->getEnvPlaceholders() as $env => $placeholders) {
@@ -207,6 +207,6 @@ public function resolveEnvPlaceholders(mixed $value, string|bool|null $format =
207207
}
208208
}
209209

210-
return parent::resolveEnvPlaceholders($value, $format, $usedEnvs);
210+
return parent::resolveEnvPlaceholders($value, true, $usedEnvs);
211211
}
212212
}

ContainerBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ public function fileExists(string $path, bool|string $trackContents = true): boo
446446
if (!$exists) {
447447
$this->addResource(new FileExistenceResource($path));
448448

449-
return $exists;
449+
return false;
450450
}
451451

452452
if (is_dir($path)) {
@@ -459,7 +459,7 @@ public function fileExists(string $path, bool|string $trackContents = true): boo
459459
$this->addResource(new FileResource($path));
460460
}
461461

462-
return $exists;
462+
return true;
463463
}
464464

465465
/**

Loader/YamlFileLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ private function parseDefinition(string $id, array|string|null $service, string
448448
throw new InvalidArgumentException(\sprintf('Missing attribute "version" of the "deprecated" option in "%s".', $file));
449449
}
450450

451-
$alias->setDeprecated($deprecation['package'] ?? '', $deprecation['version'] ?? '', $deprecation['message'] ?? '');
451+
$alias->setDeprecated($deprecation['package'], $deprecation['version'], $deprecation['message'] ?? '');
452452
}
453453
}
454454

@@ -520,7 +520,7 @@ private function parseDefinition(string $id, array|string|null $service, string
520520
throw new InvalidArgumentException(\sprintf('Missing attribute "version" of the "deprecated" option in "%s".', $file));
521521
}
522522

523-
$definition->setDeprecated($deprecation['package'] ?? '', $deprecation['version'] ?? '', $deprecation['message'] ?? '');
523+
$definition->setDeprecated($deprecation['package'], $deprecation['version'], $deprecation['message'] ?? '');
524524
}
525525

526526
if (isset($service['factory'])) {

0 commit comments

Comments
 (0)