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

Commit

Permalink
[PSR-2] fixers=braces,elseif,short_tag,php_closing_tag,trailing_space…
Browse files Browse the repository at this point in the history
…s,linefeed

Applied php-cs-fixer --fixers=braces,elseif,short_tag,php_closing_tag,trailing_spaces,linefeed
  • Loading branch information
Maks3w committed Jul 12, 2012
1 parent 53d4205 commit 51b0320
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/AbstractContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function addPages($pages)
);
}

// Because adding a page to a container removes it from the original
// Because adding a page to a container removes it from the original
// (see {@link Page\AbstractPage::setParent()}), iteration of the
// original container will break. As such, we need to iterate the
// container into an array first.
Expand Down Expand Up @@ -237,7 +237,7 @@ public function removePages()
* Checks if the container has the given page
*
* @param Page\AbstractPage $page page to look for
* @param bool $recursive [optional] whether to search recursively.
* @param bool $recursive [optional] whether to search recursively.
* Default is false.
* @return bool whether page is in container
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/BadMethodCallException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* @package Zend_Navigation
* @subpackage Exception
*/
class BadMethodCallException extends \BadMethodCallException implements
class BadMethodCallException extends \BadMethodCallException implements
ExceptionInterface
{}
2 changes: 1 addition & 1 deletion src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* @package Zend_Navigation
* @subpackage Exception
*/
class InvalidArgumentException extends \InvalidArgumentException implements
class InvalidArgumentException extends \InvalidArgumentException implements
ExceptionInterface
{}
8 changes: 4 additions & 4 deletions src/Page/AbstractPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -643,15 +643,15 @@ public function getOrder()
/**
* Sets ACL resource assoicated with this page
*
* @param string|AclResource $resource [optional] resource to associate
* with page. Default is null, which
* @param string|AclResource $resource [optional] resource to associate
* with page. Default is null, which
* sets no resource.
* @return AbstractPage fluent interface, returns self
* @throws Exception\InvalidArgumentException if $resource is invalid
*/
public function setResource($resource = null)
{
if (null === $resource
if (null === $resource
|| is_string($resource)
|| $resource instanceof AclResource
) {
Expand Down Expand Up @@ -778,7 +778,7 @@ public function setVisible($visible = true)
*/
public function isVisible($recursive = false)
{
if ($recursive
if ($recursive
&& isset($this->parent)
&& $this->parent instanceof self
) {
Expand Down
4 changes: 2 additions & 2 deletions src/Service/AbstractNavigationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ protected function getPagesFromConfig($config = null)
$config
));
}
} else if ($config instanceof Config\Config) {
} elseif ($config instanceof Config\Config) {
$config = $config->toArray();
} else if (!is_array($config)) {
} elseif (!is_array($config)) {
throw new Exception\InvalidArgumentException('
Invalid input, expected array, filename, or Zend\Config object'
);
Expand Down
8 changes: 4 additions & 4 deletions test/Page/PageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ public function testSetAndGetFragmentIdentifier()
'uri' => '#',
'fragment' => 'foo',
));

$this->assertEquals('foo', $page->getFragment());

$page->setFragment('bar');
$this->assertEquals('bar', $page->getFragment());

$invalids = array(42, (object) null);
foreach ($invalids as $invalid) {
try {
Expand Down Expand Up @@ -716,7 +716,7 @@ public function testSetVisibleShouldJuggleValue()

/**
* ZF-10146
*
*
* @link http://framework.zend.com/issues/browse/ZF-10146
*/
$page->setVisible('False');
Expand Down
8 changes: 4 additions & 4 deletions test/Page/UriTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ public function testGetHref()
public function testGetHrefWithFragmentIdentifier()
{
$uri = 'http://www.example.com/foo.html';

$page = new Page\Uri();
$page->setUri($uri);
$page->setFragment('bar');

$this->assertEquals($uri . '#bar', $page->getHref());

$page->setUri('#');

$this->assertEquals('#bar', $page->getHref());
}
}

0 comments on commit 51b0320

Please sign in to comment.