@@ -128,7 +128,7 @@ |
||
128 | 128 | */ |
129 | 129 | public function setInput($input): void |
130 | 130 | { |
131 | - if (! \mb_check_encoding($input, 'UTF-8')) { |
|
131 | + if (!\mb_check_encoding($input, 'UTF-8')) { |
|
132 | 132 | throw new UnexpectedEncodingException('Unexpected encoding - UTF-8 or ASCII was expected'); |
133 | 133 | } |
134 | 134 |
@@ -120,7 +120,7 @@ |
||
120 | 120 | |
121 | 121 | public function replaceWith(Node $replacement): void |
122 | 122 | { |
123 | - if (! $this->document) { |
|
123 | + if (!$this->document) { |
|
124 | 124 | return; |
125 | 125 | } |
126 | 126 |
@@ -44,12 +44,12 @@ |
||
44 | 44 | */ |
45 | 45 | public function render(Node $node) |
46 | 46 | { |
47 | - if (! ($node instanceof Image)) { |
|
47 | + if (!($node instanceof Image)) { |
|
48 | 48 | throw new \InvalidArgumentException('Incompatible node type: ' . \get_class($node)); |
49 | 49 | } |
50 | 50 | |
51 | 51 | $allowUnsafeLinks = (bool) $this->config->get('allow_unsafe_links'); |
52 | - if (! $allowUnsafeLinks && self::isLinkPotentiallyUnsafe($node->getUrl())) { |
|
52 | + if (!$allowUnsafeLinks && self::isLinkPotentiallyUnsafe($node->getUrl())) { |
|
53 | 53 | $node->setAttribute('src', ''); |
54 | 54 | } |
55 | 55 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | // Ensure emojis are set to the correct stringable type. |
37 | 37 | foreach ($e->getDocument()->getNodes() as $node) { |
38 | - if (! ($node instanceof Emoji)) { |
|
38 | + if (!($node instanceof Emoji)) { |
|
39 | 39 | continue; |
40 | 40 | } |
41 | 41 |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $type = (string) $this->config->get('twemoji.type'); |
42 | 42 | |
43 | 43 | foreach ($e->getDocument()->getNodes() as $node) { |
44 | - if (! ($node instanceof Emoji) || $node->hexcode === null) { |
|
44 | + if (!($node instanceof Emoji) || $node->hexcode === null) { |
|
45 | 45 | continue; |
46 | 46 | } |
47 | 47 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | if ($inline && $size === null) { |
83 | 83 | $image->setAttribute('style', 'width: 1em; height: 1em; vertical-align: middle;'); |
84 | 84 | } elseif ($inline && $size !== null) { |
85 | - if (! \is_string($size)) { |
|
85 | + if (!\is_string($size)) { |
|
86 | 86 | $size .= 'em'; |
87 | 87 | } |
88 | 88 |
@@ -51,7 +51,7 @@ |
||
51 | 51 | $this->lexer->moveNext(); |
52 | 52 | |
53 | 53 | while (true) { |
54 | - if (! $this->lexer->lookahead) { |
|
54 | + if (!$this->lexer->lookahead) { |
|
55 | 55 | break; |
56 | 56 | } |
57 | 57 |