Skip to content

Commit

Permalink
Merge branch '4.4' into 5.2
Browse files Browse the repository at this point in the history
* 4.4:
  Simplify some code with null coalesce operator
  • Loading branch information
derrabus committed Jul 18, 2021
2 parents a533160 + 918a576 commit bcb47bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Compiler/MergeExtensionConfigurationPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function freezeAfterProcessing(Extension $extension, ContainerBuilder $co
*/
public function getEnvPlaceholders(): array
{
return null !== $this->processedEnvPlaceholders ? $this->processedEnvPlaceholders : parent::getEnvPlaceholders();
return $this->processedEnvPlaceholders ?? parent::getEnvPlaceholders();
}

public function getUnusedEnvPlaceholders(): array
Expand Down
2 changes: 1 addition & 1 deletion ContainerBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,7 @@ private function callMethod(object $service, array $call, array &$inlineServices
*/
private function shareService(Definition $definition, $service, ?string $id, array &$inlineServices)
{
$inlineServices[null !== $id ? $id : spl_object_hash($definition)] = $service;
$inlineServices[$id ?? spl_object_hash($definition)] = $service;

if (null !== $id && $definition->isShared()) {
$this->services[$id] = $service;
Expand Down

0 comments on commit bcb47bb

Please sign in to comment.