Skip to content

Commit 9557832

Browse files
committed
Merge branch '5.2' into 5.3
* 5.2: Simplify some code with null coalesce operator Don't use deprecated TestLogger class
2 parents 4a569e8 + fa9d19d commit 9557832

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

Command/AssetsInstallCommand.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,6 @@ private function getPublicDirectory(ContainerInterface $container): string
275275

276276
$composerConfig = json_decode(file_get_contents($composerFilePath), true);
277277

278-
if (isset($composerConfig['extra']['public-dir'])) {
279-
return $composerConfig['extra']['public-dir'];
280-
}
281-
282-
return $defaultPublicDir;
278+
return $composerConfig['extra']['public-dir'] ?? $defaultPublicDir;
283279
}
284280
}

Console/Descriptor/MarkdownDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ protected function describeContainerEnvVars(array $envs, array $options = [])
286286

287287
protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = [])
288288
{
289-
$event = \array_key_exists('event', $options) ? $options['event'] : null;
289+
$event = $options['event'] ?? null;
290290
$dispatcherServiceName = $options['dispatcher_service_name'] ?? null;
291291

292292
$title = 'Registered listeners';

Console/Descriptor/TextDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ protected function describeContainerEnvVars(array $envs, array $options = [])
476476

477477
protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = [])
478478
{
479-
$event = \array_key_exists('event', $options) ? $options['event'] : null;
479+
$event = $options['event'] ?? null;
480480
$dispatcherServiceName = $options['dispatcher_service_name'] ?? null;
481481

482482
$title = 'Registered Listeners';

0 commit comments

Comments
 (0)