Skip to content

Commit 0225ecf

Browse files
committed
SCA: simplify some ifs in favour of null coalescing operator
1 parent 1ebec29 commit 0225ecf

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Asynchronous/Routing/SenderLocator.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ public static function getValueFromMessageRouting(array $mapping, $message)
5757
if ($interfaceMapping = array_intersect_key($mapping, class_implements($message))) {
5858
return current($interfaceMapping);
5959
}
60-
if (isset($mapping['*'])) {
61-
return $mapping['*'];
62-
}
63-
64-
return null;
60+
return $mapping['*'] ?? null;
6561
}
6662
}

0 commit comments

Comments
 (0)