Remove constants existence validation
These constants are available since PHP 5.4 and since we're requiring PHP 7.1 there's no reason to require them. I've also simplified the `array_map()` call since it's useless to define a closure that simply calls a function.
This commit is contained in:
parent
214dc9896b
commit
8a893068ce
@ -217,11 +217,7 @@ EOT
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($value)) {
|
if (is_array($value)) {
|
||||||
if (defined('JSON_UNESCAPED_UNICODE') && defined('JSON_UNESCAPED_SLASHES')) {
|
return json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
||||||
return json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
|
||||||
}
|
|
||||||
|
|
||||||
return json_encode($value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_object($value)) {
|
if (is_object($value)) {
|
||||||
@ -283,14 +279,6 @@ EOT
|
|||||||
*/
|
*/
|
||||||
private function formatEntityListeners(array $entityListeners)
|
private function formatEntityListeners(array $entityListeners)
|
||||||
{
|
{
|
||||||
return $this->formatField(
|
return $this->formatField('Entity listeners', array_map('get_class', $entityListeners));
|
||||||
'Entity listeners',
|
|
||||||
array_map(
|
|
||||||
function ($entityListener) {
|
|
||||||
return get_class($entityListener);
|
|
||||||
},
|
|
||||||
$entityListeners
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user