Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'feature/7232' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed Feb 25, 2015
2 parents 7f4a0b5 + b4d8831 commit 7a3db60
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/Helper/Doctype.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public function getDoctypes()
*/
public function isXhtml()
{
return (stristr($this->getDoctype(), 'xhtml') ? true : false);
return (bool) stristr($this->getDoctype(), 'xhtml');
}

/**
Expand All @@ -215,7 +215,7 @@ public function isXhtml()
*/
public function isHtml5()
{
return (stristr($this->__invoke(), '<!DOCTYPE html>') ? true : false);
return (bool) stristr($this->__invoke(), '<!DOCTYPE html>');
}

/**
Expand All @@ -225,6 +225,6 @@ public function isHtml5()
*/
public function isRdfa()
{
return ($this->isHtml5() || stristr($this->getDoctype(), 'rdfa') ? true : false);
return ($this->isHtml5() || stristr($this->getDoctype(), 'rdfa'));
}
}
4 changes: 2 additions & 2 deletions src/Helper/HeadScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ public function toString($indent = null)
: $this->getIndent();

if ($this->view) {
$useCdata = $this->view->plugin('doctype')->isXhtml() ? true : false;
$useCdata = $this->view->plugin('doctype')->isXhtml();
} else {
$useCdata = $this->useCdata ? true : false;
$useCdata = $this->useCdata;
}

$escapeStart = ($useCdata) ? '//<![CDATA[' : '//<!--';
Expand Down
2 changes: 1 addition & 1 deletion src/Helper/Placeholder/Container/AbstractStandalone.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ protected function escape($string)
*/
public function setAutoEscape($autoEscape = true)
{
$this->autoEscape = ($autoEscape) ? true : false;
$this->autoEscape = (bool) $autoEscape;
return $this;
}

Expand Down
6 changes: 3 additions & 3 deletions test/Helper/HeadStyleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ public function testHeadStyleProxiesProperly()
->__invoke($style3, 'APPEND');
$this->assertEquals(3, count($this->helper));
$values = $this->helper->getArrayCopy();
$this->assertTrue((strstr($values[0]->content, $style2)) ? true : false);
$this->assertTrue((strstr($values[1]->content, $style1)) ? true : false);
$this->assertTrue((strstr($values[2]->content, $style3)) ? true : false);
$this->assertTrue((bool) strstr($values[0]->content, $style2));
$this->assertTrue((bool) strstr($values[1]->content, $style1));
$this->assertTrue((bool) strstr($values[2]->content, $style3));
}

public function testToStyleGeneratesValidHtml()
Expand Down
4 changes: 2 additions & 2 deletions test/Helper/Placeholder/ContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ public function testIndentationIsHonored()

$lis = substr_count($string, "\n <li>");
$this->assertEquals(3, $lis);
$this->assertTrue((strstr($string, " <ul>\n")) ? true : false, $string);
$this->assertTrue((strstr($string, "\n </ul>")) ? true : false);
$this->assertTrue((bool) strstr($string, " <ul>\n"), $string);
$this->assertTrue((bool) strstr($string, "\n </ul>"));
}
}

0 comments on commit 7a3db60

Please sign in to comment.