Skip to content

Commit 5b24bd1

Browse files
minor #53119 Code updates (javiereguiluz)
This PR was squashed before being merged into the 7.1 branch. Discussion ---------- Code updates | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT For your consideration, this PR includes several simplifications/improvements to code as suggested by PHPStorm inspection tools. Commits ------- e29033486d Code updates
2 parents c4ea5cf + 6e6f3ce commit 5b24bd1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Console/Descriptor/JsonDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ private function getContainerAliasData(Alias $alias): array
323323
private function getEventDispatcherListenersData(EventDispatcherInterface $eventDispatcher, array $options): array
324324
{
325325
$data = [];
326-
$event = \array_key_exists('event', $options) ? $options['event'] : null;
326+
$event = $options['event'] ?? null;
327327

328328
if (null !== $event) {
329329
foreach ($eventDispatcher->getListeners($event) as $listener) {

Console/Descriptor/XmlDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ private function getContainerParameterDocument(mixed $parameter, ?array $depreca
501501

502502
private function getEventDispatcherListenersDocument(EventDispatcherInterface $eventDispatcher, array $options): \DOMDocument
503503
{
504-
$event = \array_key_exists('event', $options) ? $options['event'] : null;
504+
$event = $options['event'] ?? null;
505505
$dom = new \DOMDocument('1.0', 'UTF-8');
506506
$dom->appendChild($eventDispatcherXML = $dom->createElement('event-dispatcher'));
507507

0 commit comments

Comments
 (0)