diff --git a/src/CssInliner.php b/src/CssInliner.php index 42c3cfbc..cb4cb5b4 100644 --- a/src/CssInliner.php +++ b/src/CssInliner.php @@ -1135,7 +1135,7 @@ protected function addStyleElementToDocument(string $css) $headElement = $this->getHeadElement(); - if (null === $headElement) { + if ($headElement === null) { throw new \UnexpectedValueException('Could not find '); } diff --git a/src/HtmlProcessor/AbstractHtmlProcessor.php b/src/HtmlProcessor/AbstractHtmlProcessor.php index 0283d4e0..9ad35a6d 100644 --- a/src/HtmlProcessor/AbstractHtmlProcessor.php +++ b/src/HtmlProcessor/AbstractHtmlProcessor.php @@ -129,7 +129,7 @@ public function getDomDocument(): \DOMDocument */ public function getXPath(): \DOMXPath { - if (null === $this->xPath) { + if ($this->xPath === null) { throw new \UnexpectedValueException( self::class . '::setDomDocument() has not yet been called on ' . @@ -162,7 +162,7 @@ public function render(): string { $htmlWithPossibleErroneousClosingTags = $this->getDomDocument()->saveHTML(); - if (false === $htmlWithPossibleErroneousClosingTags) { + if ($htmlWithPossibleErroneousClosingTags === false) { throw new \UnexpectedValueException( 'Could not save html from ' . self::class . @@ -184,7 +184,7 @@ public function renderBodyContent(): string { $htmlWithPossibleErroneousClosingTags = $this->getDomDocument()->saveHTML($this->getBodyElement()); - if (false === $htmlWithPossibleErroneousClosingTags) { + if ($htmlWithPossibleErroneousClosingTags === false) { throw new \UnexpectedValueException( 'Failed to save html on ' . self::class .