Skip to content

Commit c680b81

Browse files
committed
PHP-CS-Fixer cleanup
1 parent fa8fac0 commit c680b81

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/PHPHtmlParser/Dom/Node/TextNode.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ public function __construct(string $text, $removeDoubleSpace = true)
5252
$replacedText = \mb_ereg_replace('\s+', ' ', $text);
5353
if ($replacedText === false) {
5454
throw new LogicalException('mb_ereg_replace returns false when attempting to clean white space from "' . $text . '".');
55-
} elseif ($replacedText === null) {
55+
}
56+
if ($replacedText === null) {
5657
throw new LogicalException('mb_ereg_replace encountered an invalid encoding for "' . $text . '".');
5758
}
5859
$text = $replacedText;

src/PHPHtmlParser/Dom/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function parse(Options $options, Content $content, int $size): AbstractNo
3737
$root->setHtmlSpecialCharsDecode($options->isHtmlSpecialCharsDecode());
3838
$activeNode = $root;
3939
while ($activeNode !== null) {
40-
if ($activeNode && is_object( $activeNode->tag ) && $activeNode->tag->name() === 'script'
40+
if ($activeNode && \is_object($activeNode->tag) && $activeNode->tag->name() === 'script'
4141
&& $options->isCleanupInput() !== true
4242
) {
4343
$str = $content->copyUntil('</');

src/PHPHtmlParser/Dom/Tag.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,11 @@ public function makeOpeningTag()
328328
$attributeDTO = $this->getAttribute($key);
329329
$val = $attributeDTO->getValue();
330330
} catch (AttributeNotFoundException $e) {
331-
unset($e);
331+
unset($e);
332332
// attribute that was in the array not found in the array... let's continue.
333333
continue;
334334
} catch (\TypeError $e) {
335-
unset($e);
335+
unset($e);
336336
$val = null;
337337
}
338338
if (\is_null($val)) {

0 commit comments

Comments
 (0)