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/various-things' of https://github.com/Maks3w/zf2
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 51 changed files with 323 additions and 324 deletions.
2 changes: 1 addition & 1 deletion src/Helper/AbstractHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function setView(Renderer $view)

/**
* Get the view object
*
*
* @return null|Renderer
*/
public function getView()
Expand Down
2 changes: 1 addition & 1 deletion src/Helper/DeclareVars.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __invoke()
foreach ($key as $name => $value) {
$this->_declareVar($name, $value);
}
} else if (!isset($view->vars()->$key)) {
} elseif (!isset($view->vars()->$key)) {
$this->_declareVar($key);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Helper/EscapeCss.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
class EscapeCss extends Escaper\AbstractHelper
{

/**
* Escape a value for current escaping strategy
*
Expand All @@ -32,5 +32,5 @@ protected function escape($value)
{
return $this->getEscaper()->escapeCss($value);
}

}
2 changes: 1 addition & 1 deletion src/Helper/EscapeHtml.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
class EscapeHtml extends Escaper\AbstractHelper
{

/**
* Escape a value for current escaping strategy
*
Expand Down
2 changes: 1 addition & 1 deletion src/Helper/EscapeHtmlAttr.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
class EscapeHtmlAttr extends Escaper\AbstractHelper
{

/**
* Escape a value for current escaping strategy
*
Expand Down
2 changes: 1 addition & 1 deletion src/Helper/EscapeJs.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
class EscapeJs extends Escaper\AbstractHelper
{

/**
* Escape a value for current escaping strategy
*
Expand Down
2 changes: 1 addition & 1 deletion src/Helper/EscapeUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
class EscapeUrl extends Escaper\AbstractHelper
{

/**
* Escape a value for current escaping strategy
*
Expand Down
10 changes: 5 additions & 5 deletions src/Helper/Escaper/AbstractHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public function getEscaper()

/**
* Set the encoding to use for escape operations
*
* @param string $encoding
*
* @param string $encoding
* @return AbstractEscaper
*/
public function setEncoding($encoding)
Expand All @@ -76,7 +76,7 @@ public function setEncoding($encoding)

/**
* Get the encoding to use for escape operations
*
*
* @return string
*/
public function getEncoding()
Expand All @@ -86,8 +86,8 @@ public function getEncoding()

/**
* Invoke this helper: escape a value
*
* @param mixed $value
*
* @param mixed $value
* @param int $recurse Expects one of the recursion constants; used to decide whether or not to recurse the given value when escaping
* @return mixed Given a scalar, a scalar value is returned. Given an object, with the $recurse flag not allowing object recursion, returns a string. Otherwise, returns an array.
* @throws Exception\InvalidArgumentException
Expand Down
4 changes: 2 additions & 2 deletions src/Helper/HeadMeta.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ public function __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
* @param string $charset
* @return \Zend\View\Helper\HeadMeta Provides a fluent interface
*/
public function setCharset($charset)
Expand Down
4 changes: 2 additions & 2 deletions src/Helper/HeadScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public function itemToString($item, $indent, $escapeStart, $escapeEnd)
$attrString = '';
if (!empty($item->attributes)) {
foreach ($item->attributes as $key => $value) {
if ((!$this->arbitraryAttributesAllowed() && !in_array($key, $this->_optionalAttributes))
if ((!$this->arbitraryAttributesAllowed() && !in_array($key, $this->_optionalAttributes))
|| in_array($key, array('conditional', 'noescape')))
{
continue;
Expand Down Expand Up @@ -424,7 +424,7 @@ public function itemToString($item, $indent, $escapeStart, $escapeEnd)
if ($addScriptEscape) {
$html .= $indent . ' ' . $escapeEnd . PHP_EOL;
}

$html .= $indent;
}
$html .= '</script>';
Expand Down
4 changes: 2 additions & 2 deletions src/Helper/Layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function __invoke($template = null)

/**
* Get the root view model
*
*
* @return null|Model
*/
protected function getRoot()
Expand All @@ -86,7 +86,7 @@ protected function getRoot()

/**
* Retrieve the view model helper
*
*
* @return ViewModel
*/
protected function getViewModelHelper()
Expand Down
18 changes: 9 additions & 9 deletions src/Helper/Navigation/Breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ public function getLinkLast()
* Sets which partial view script to use for rendering menu
*
* @param string|array $partial partial view script or null. If an array is
* given, it is expected to contain two
* values; the partial view script to use,
* and the module where the script can be
* given, it is expected to contain two
* values; the partial view script to use,
* and the module where the script can be
* found.
* @return Breadcrumbs fluent interface, returns self
*/
Expand Down Expand Up @@ -209,13 +209,13 @@ public function renderStraight($container = null)
* so in the script it will be available in <code>$this->container</code>.
*
* @param AbstractContainer $container [optional] container to pass to view script.
* Default is to use the container registered
* Default is to use the container registered
* in the helper.
* @param string|array $partial [optional] partial view script to use.
* Default is to use the partial registered
* in the helper. If an array is given, it
* is expected to contain two values; the
* partial view script to use, and the module
* @param string|array $partial [optional] partial view script to use.
* Default is to use the partial registered
* in the helper. If an array is given, it
* is expected to contain two values; the
* partial view script to use, and the module
* where the script can be found.
* @return string helper output
* @throws Exception\RuntimeException if no partial provided
Expand Down
20 changes: 10 additions & 10 deletions src/Helper/Navigation/HelperInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ interface HelperInterface
* Sets navigation container the helper should operate on by default
*
* @param string|Navigation\AbstractContainer $container [optional] container to operate
* on. Default is null, which
* indicates that the container
* on. Default is null, which
* indicates that the container
* should be reset.
* @return HelperInterface fluent interface, returns self
*/
Expand All @@ -44,9 +44,9 @@ public function getContainer();
/**
* Sets translator to use in helper
*
* @param mixed $translator [optional] translator. Expects an object of
* type {@link \Zend\Translator\Adapter} or
* {@link \Zend\Translator\Translator}, or null.
* @param mixed $translator [optional] translator. Expects an object of
* type {@link \Zend\Translator\Adapter} or
* {@link \Zend\Translator\Translator}, or null.
* Default is null.
* @return HelperInterface fluent interface, returns self
*/
Expand Down Expand Up @@ -78,8 +78,8 @@ public function getAcl();
/**
* Sets ACL role to use when iterating pages
*
* @param mixed $role [optional] role to set. Expects a string, an
* instance of type {@link Acl\Role}, or null. Default
* @param mixed $role [optional] role to set. Expects a string, an
* instance of type {@link Acl\Role}, or null. Default
* is null.
* @throws \Zend\View\Exception if $role is invalid
* @return HelperInterface fluent interface, returns
Expand Down Expand Up @@ -179,9 +179,9 @@ public function __toString();
* Renders helper
*
* @param string|Navigation\AbstractContainer $container [optional] container to render.
* Default is null, which indicates
* that the helper should render
* the container returned by {@link
* Default is null, which indicates
* that the helper should render
* the container returned by {@link
* getContainer()}.
* @return string helper output
* @throws \Zend\View\Exception\ExceptionInterface if unable to render
Expand Down
4 changes: 2 additions & 2 deletions src/Helper/Navigation/Links.php
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,8 @@ public function renderLink(AbstractPage $page, $attrib, $relation)
* Implements {@link HelperInterface::render()}.
*
* @param AbstractContainer string|$container [optional] container to render.
* Default is to render the
* container registered in the
* Default is to render the
* container registered in the
* helper.
* @return string helper output
*/
Expand Down
36 changes: 18 additions & 18 deletions src/Helper/Navigation/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ public function getRenderParents()
* Sets which partial view script to use for rendering menu
*
* @param string|array $partial partial view script or null. If an array is
* given, it is expected to contain two
* values; the partial view script to use,
* and the module where the script can be
* given, it is expected to contain two
* values; the partial view script to use,
* and the module where the script can be
* found.
* @return Menu fluent interface, returns self
*/
Expand Down Expand Up @@ -306,10 +306,10 @@ protected function renderDeepestMenu(AbstractContainer $container,
if (!$active['page']->hasPages()) {
return '';
}
} else if (!$active['page']->hasPages()) {
} elseif (!$active['page']->hasPages()) {
// found pages has no children; render siblings
$active['page'] = $active['page']->getParent();
} else if (is_int($maxDepth) && $active['depth'] +1 > $maxDepth) {
} elseif (is_int($maxDepth) && $active['depth'] +1 > $maxDepth) {
// children are below max depth; render siblings
$active['page'] = $active['page']->getParent();
}
Expand Down Expand Up @@ -376,14 +376,14 @@ protected function _renderMenu(AbstractContainer $container,
if ($depth < $minDepth || !$this->accept($page)) {
// page is below minDepth or not accepted by acl/visibilty
continue;
} else if ($onlyActive && !$isActive) {
} elseif ($onlyActive && !$isActive) {
// page is not active itself, but might be in the active branch
$accept = false;
if ($foundPage) {
if ($foundPage->hasPage($page)) {
// accept if page is a direct child of the active page
$accept = true;
} else if ($foundPage->getParent()->hasPage($page)) {
} elseif ($foundPage->getParent()->hasPage($page)) {
// page is a sibling of the active page...
if (!$foundPage->hasPages() ||
is_int($maxDepth) && $foundDepth + 1 > $maxDepth) {
Expand Down Expand Up @@ -411,7 +411,7 @@ protected function _renderMenu(AbstractContainer $container,
$ulClass = '';
}
$html .= $myIndent . '<ul' . $ulClass . '>' . self::EOL;
} else if ($prevDepth > $depth) {
} elseif ($prevDepth > $depth) {
// close li/ul tags until we're at current depth
for ($i = $prevDepth; $i > $depth; $i--) {
$ind = $indent . str_repeat(' ', $i);
Expand Down Expand Up @@ -457,9 +457,9 @@ protected function _renderMenu(AbstractContainer $container,
*
*
* @param AbstractContainer $container [optional] container to create menu from.
* Default is to use the container retrieved
* Default is to use the container retrieved
* from {@link getContainer()}.
* @param array $options [optional] options for controlling rendering
* @param array $options [optional] options for controlling rendering
* @return string rendered menu
*/
public function renderMenu($container = null, array $options = array())
Expand Down Expand Up @@ -542,14 +542,14 @@ public function renderSubMenu(AbstractContainer $container = null,
* <code>echo 'Number of pages: ', count($this->container);</code>.
*
* @param AbstractContainer $container [optional] container to pass to view
* script. Default is to use the container
* script. Default is to use the container
* registered in the helper.
* @param string|array $partial [optional] partial view script to use.
* Default is to use the partial
* registered in the helper. If an array
* is given, it is expected to contain two
* values; the partial view script to use,
* and the module where the script can be
* @param string|array $partial [optional] partial view script to use.
* Default is to use the partial
* registered in the helper. If an array
* is given, it is expected to contain two
* values; the partial view script to use,
* and the module where the script can be
* found.
* @return string helper output
* @throws Exception\RuntimeException if no partial provided
Expand Down Expand Up @@ -608,7 +608,7 @@ public function renderPartial($container = null, $partial = null)
* @see renderMenu()
*
* @param AbstractContainer $container [optional] container to render. Default is
* to render the container registered in the
* to render the container registered in the
* helper.
* @return string helper output
*/
Expand Down
8 changes: 4 additions & 4 deletions src/Helper/Navigation/PluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Plugin manager implementation for navigation helpers
*
* Enforces that helpers retrieved are instances of
* Navigation\HelperInterface. Additionally, it registers a number of default
* Navigation\HelperInterface. Additionally, it registers a number of default
* helpers.
*
* @category Zend
Expand All @@ -28,7 +28,7 @@ class PluginManager extends HelperPluginManager
{
/**
* Default set of helpers
*
*
* @var array
*/
protected $invokableClasses = array(
Expand All @@ -42,8 +42,8 @@ class PluginManager extends HelperPluginManager
* Validate the plugin
*
* Checks that the helper loaded is an instance of AbstractHelper.
*
* @param mixed $plugin
*
* @param mixed $plugin
* @return void
* @throws Exception\InvalidArgumentException if invalid
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Helper/Placeholder/Registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class Registry
{
/**
* @var Registry Singleton instance
* @var Registry Singleton instance
*/
protected static $instance;

Expand Down Expand Up @@ -55,7 +55,7 @@ public static function getRegistry()
* Unset the singleton
*
* Primarily useful for testing purposes; sets {@link $instance} to null.
*
*
* @return void
*/
public static function unsetRegistry()
Expand Down
Loading

0 comments on commit 3729984

Please sign in to comment.