Skip to content

Commit

Permalink
Remove useless ternary
Browse files Browse the repository at this point in the history
This constant is defined since php 5.3, and we require 7.2.
  • Loading branch information
greg0ire committed Mar 27, 2020
1 parent 874834a commit f219f3a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/HtmlHighlighter.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Doctrine\SqlFormatter;

use function defined;
use function htmlentities;
use function trim;
use const ENT_COMPAT;
Expand Down Expand Up @@ -57,9 +56,7 @@ public function highlightToken(array $token) : string
{
[SqlFormatter::TOKEN_TYPE => $type, SqlFormatter::TOKEN_VALUE => $value] = $token;

$value = defined('ENT_IGNORE') ?
htmlentities($value, ENT_COMPAT | ENT_IGNORE, 'UTF-8'):
htmlentities($value, ENT_COMPAT, 'UTF-8');
$value = htmlentities($value, ENT_COMPAT | ENT_IGNORE, 'UTF-8');

if ($type === SqlFormatter::TOKEN_TYPE_BOUNDARY && ($value==='(' || $value===')')) {
return $value;
Expand Down

0 comments on commit f219f3a

Please sign in to comment.