Skip to content

Commit 9bec1a8

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 07b6ae3 + 83a77c4 commit 9bec1a8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ContainerAwareEventManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function dispatchEvent($eventName, EventArgs $eventArgs = null)
5858
return;
5959
}
6060

61-
$eventArgs = null === $eventArgs ? EventArgs::getEmptyInstance() : $eventArgs;
61+
$eventArgs = $eventArgs ?? EventArgs::getEmptyInstance();
6262

6363
if (!isset($this->initialized[$eventName])) {
6464
$this->initializeListeners($eventName);

Validator/Constraints/UniqueEntityValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public function validate($entity, Constraint $constraint)
165165
return;
166166
}
167167

168-
$errorPath = null !== $constraint->errorPath ? $constraint->errorPath : $fields[0];
168+
$errorPath = $constraint->errorPath ?? $fields[0];
169169
$invalidValue = $criteria[$errorPath] ?? $criteria[$fields[0]];
170170

171171
$this->context->buildViolation($constraint->message)

0 commit comments

Comments
 (0)