Skip to content

Commit

Permalink
[BUGFIX] satisfy php-cs-fixer
Browse files Browse the repository at this point in the history
This commit resolves the yoda conditions introduced in previous
[BUGFIX] commits.

regarding: MyIntervals#794, MyIntervals#778 (comment)
  • Loading branch information
SignpostMarv committed Oct 7, 2019
1 parent 62d31e8 commit b8cdcaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/CssInliner.php
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ protected function addStyleElementToDocument(string $css)

$headElement = $this->getHeadElement();

if (null === $headElement) {
if ($headElement === null) {
throw new \UnexpectedValueException('Could not find <head>');
}

Expand Down
6 changes: 3 additions & 3 deletions src/HtmlProcessor/AbstractHtmlProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ' .
Expand Down Expand Up @@ -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 .
Expand All @@ -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 .
Expand Down

0 comments on commit b8cdcaa

Please sign in to comment.