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

Commit

Permalink
Merge branch 'cs/psr-2' of https://github.com/Maks3w/zf2
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed Jul 13, 2012
4 parents 3729984 + 698dbe0 + ffff3ea + 6f3a3a1 commit a5ce396
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 45 deletions.
2 changes: 1 addition & 1 deletion src/Helper/Escaper/AbstractHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,6 @@ public function __invoke($value, $recurse = self::RECURSE_NONE)
* @param string $value
* @return string
*/
protected abstract function escape($value);
abstract protected function escape($value);

}
22 changes: 11 additions & 11 deletions src/Helper/HeadMeta.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,14 @@ public function __call($method, $args)
return parent::__call($method, $args);
}

/**
* Create an HTML5-style meta charset tag. Something like <meta charset="utf-8">
*
* Not valid in a non-HTML5 doctype
*
* @param string $charset
* @return \Zend\View\Helper\HeadMeta Provides a fluent interface
*/
/**
* Create an HTML5-style meta charset tag. Something like <meta charset="utf-8">
*
* Not valid in a non-HTML5 doctype
*
* @param string $charset
* @return \Zend\View\Helper\HeadMeta Provides a fluent interface
*/
public function setCharset($charset)
{
$item = new \stdClass;
Expand Down Expand Up @@ -344,9 +344,9 @@ public function itemToString(\stdClass $item)
if ($this->view->plugin('doctype')->isHtml5()
&& $type == 'charset'
) {
$tpl = ($this->view->plugin('doctype')->isXhtml())
? '<meta %s="%s"/>'
: '<meta %s="%s">';
$tpl = ($this->view->plugin('doctype')->isXhtml())
? '<meta %s="%s"/>'
: '<meta %s="%s">';
} elseif ($this->view->plugin('doctype')->isXhtml()) {
$tpl = '<meta %s="%s" content="%s" %s/>';
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/Model/ModelInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function setTerminal($terminate);
public function terminate();


/**
/**
* Set flag indicating whether or not append to child with the same capture
*
* @param bool $append
Expand Down
10 changes: 5 additions & 5 deletions src/Model/ViewModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class ViewModel implements ModelInterface
protected $variables = array();


/**
/**
* Is this append to child with the same capture?
*
* @var bool
Expand Down Expand Up @@ -288,9 +288,9 @@ public function addChild(ModelInterface $child, $captureTo = null, $append = nul
if (null !== $captureTo) {
$child->setCaptureTo($captureTo);
}
if (null !== $captureTo) {
$child->setAppend($append);
}
if (null !== $captureTo) {
$child->setAppend($append);
}

return $this;
}
Expand Down Expand Up @@ -361,7 +361,7 @@ public function terminate()
return $this->terminate;
}

/**
/**
* Set flag indicating whether or not append to child with the same capture
*
* @param bool $append
Expand Down
2 changes: 1 addition & 1 deletion src/Renderer/JsonRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function setMergeUnnamedChildren($mergeUnnamedChildren)
return $this;
}

/**
/**
* Set the JSONP callback function name
*
* @param string $callback
Expand Down
44 changes: 22 additions & 22 deletions test/Helper/HeadMetaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,37 +389,37 @@ public function testContainerMaintainsCorrectOrderOfItems()
$this->assertEquals($expected, $test);
}

/**
* @issue ZF-7722
*/
public function testCharsetValidateFail()
{
$view = new View();
$view->plugin('doctype')->__invoke('HTML4_STRICT');
/**
* @issue ZF-7722
*/
public function testCharsetValidateFail()
{
$view = new View();
$view->plugin('doctype')->__invoke('HTML4_STRICT');

$this->setExpectedException('Zend\View\Exception\ExceptionInterface');
$view->plugin('headMeta')->setCharset('utf-8');
}
}

/**
* @issue ZF-7722
*/
/**
* @issue ZF-7722
*/
public function testCharset()
{
$view = new View();
$view->plugin('doctype')->__invoke('HTML5');
$view = new View();
$view->plugin('doctype')->__invoke('HTML5');

$view->plugin('headMeta')->setCharset('utf-8');
$this->assertEquals(
'<meta charset="utf-8">',
$view->plugin('headMeta')->toString());
$view->plugin('headMeta')->setCharset('utf-8');
$this->assertEquals(
'<meta charset="utf-8">',
$view->plugin('headMeta')->toString());

$view->plugin('doctype')->__invoke('XHTML5');
$view->plugin('doctype')->__invoke('XHTML5');

$this->assertEquals(
'<meta charset="utf-8"/>',
$view->plugin('headMeta')->toString());
}
$this->assertEquals(
'<meta charset="utf-8"/>',
$view->plugin('headMeta')->toString());
}

/**
* @group ZF-9743
Expand Down
2 changes: 1 addition & 1 deletion test/Helper/HeadStyleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ public function testRenderConditionalCommentsShouldNotContainHtmlEscaping()
{
$style = 'a{display:none;}';
$this->helper->appendStyle($style, array(
'conditional' => 'IE 8'
'conditional' => 'IE 8'
));
$value = $this->helper->toString();

Expand Down
4 changes: 2 additions & 2 deletions test/Helper/Navigation/SitemapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SitemapTest extends AbstractTest
protected function setUp()
{
$this->_originaltimezone = date_default_timezone_get();
date_default_timezone_set('Europe/Berlin');
date_default_timezone_set('Europe/Berlin');

if (isset($_SERVER['SERVER_NAME'])) {
$this->_oldServer['SERVER_NAME'] = $_SERVER['SERVER_NAME'];
Expand Down Expand Up @@ -173,7 +173,7 @@ public function testDropXmlDeclaration()

public function testThrowExceptionOnInvalidLoc()
{
$this->markTestIncomplete('Zend\URI changes affect this test');
$this->markTestIncomplete('Zend\URI changes affect this test');
$nav = clone $this->_nav2;
$nav->addPage(array('label' => 'Invalid', 'uri' => 'http://w.'));

Expand Down
2 changes: 1 addition & 1 deletion test/Renderer/JsonRendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public function testRendersViewModelsWithoutChildrenWithJsonpCallback()
$this->assertEquals($expected, $test);
}

/**
/**
* @dataProvider getNonObjectModels
*/
public function testRendersNonObjectModelAsJsonWithJsonpCallback($model)
Expand Down

0 comments on commit a5ce396

Please sign in to comment.