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 (defined('JSON_UNESCAPED_UNICODE') && defined('JSON_UNESCAPED_SLASHES')) {
|
||||
return json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
||||
}
|
||||
|
||||
return json_encode($value);
|
||||
return json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
||||
}
|
||||
|
||||
if (is_object($value)) {
|
||||
@ -283,14 +279,6 @@ EOT
|
||||
*/
|
||||
private function formatEntityListeners(array $entityListeners)
|
||||
{
|
||||
return $this->formatField(
|
||||
'Entity listeners',
|
||||
array_map(
|
||||
function ($entityListener) {
|
||||
return get_class($entityListener);
|
||||
},
|
||||
$entityListeners
|
||||
)
|
||||
);
|
||||
return $this->formatField('Entity listeners', array_map('get_class', $entityListeners));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user