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/phpdoc-mismatch' of https://github.com/micheh/zf2
Browse files Browse the repository at this point in the history
… into hotfix/phpdoc
  • Loading branch information
Show file tree
Hide file tree
Showing 31 changed files with 100 additions and 73 deletions.
1 change: 1 addition & 0 deletions src/Helper/BasePath.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class BasePath extends AbstractHelper
* $file is appended to the base path for simplicity.
*
* @param string|null $file
* @throws Exception\RuntimeException
* @return string
*/
public function __invoke($file = null)
Expand Down
1 change: 0 additions & 1 deletion src/Helper/Cycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ public function setName($name = self::DEFAULT_NAME)
/**
* Gets actual name of cycle
*
* @param $name
* @return string
*/
public function getName()
Expand Down
3 changes: 2 additions & 1 deletion src/Helper/Escaper/AbstractHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public function getEscaper()
* Set the encoding to use for escape operations
*
* @param string $encoding
* @return AbstractEscaper
* @throws Exception\InvalidArgumentException
* @return AbstractHelper
*/
public function setEncoding($encoding)
{
Expand Down
11 changes: 7 additions & 4 deletions src/Helper/HeadLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

namespace Zend\View\Helper;

use stdClass;
use Zend\View;
use Zend\View\Exception;

Expand Down Expand Up @@ -52,6 +53,8 @@ public function __construct()
* Returns current object instance. Optionally, allows passing array of
* values to build link.
*
* @param array $attributes
* @param string $placement
* @return \Zend\View\Helper\HeadLink
*/
public function __invoke(array $attributes = null, $placement = Placeholder\Container\AbstractContainer::APPEND)
Expand Down Expand Up @@ -161,7 +164,7 @@ public function __call($method, $args)
*/
protected function isValid($value)
{
if (!$value instanceof \stdClass) {
if (!$value instanceof stdClass) {
return false;
}

Expand Down Expand Up @@ -216,7 +219,7 @@ public function offsetSet($index, $value)
* prepend()
*
* @param array $value
* @return Zend_Layout_ViewHelper_HeadLink
* @return HeadLink
* @throws Exception\InvalidArgumentException
*/
public function prepend($value)
Expand All @@ -234,7 +237,7 @@ public function prepend($value)
* set()
*
* @param array $value
* @return Zend_Layout_ViewHelper_HeadLink
* @return HeadLink
* @throws Exception\InvalidArgumentException
*/
public function set($value)
Expand All @@ -255,7 +258,7 @@ public function set($value)
* @param stdClass $item
* @return string
*/
public function itemToString(\stdClass $item)
public function itemToString(stdClass $item)
{
$attributes = (array) $item;
$link = '<link ';
Expand Down
16 changes: 7 additions & 9 deletions src/Helper/HeadMeta.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

namespace Zend\View\Helper;

use stdClass;
use Zend\View;
use Zend\View\Exception;

Expand Down Expand Up @@ -171,7 +172,7 @@ public function __call($method, $args)
*/
public function setCharset($charset)
{
$item = new \stdClass;
$item = new stdClass;
$item->type = 'charset';
$item->charset = $charset;
$item->content = null;
Expand All @@ -188,7 +189,7 @@ public function setCharset($charset)
*/
protected function isValid($item)
{
if ((!$item instanceof \stdClass)
if ((!$item instanceof stdClass)
|| !isset($item->type)
|| !isset($item->modifiers))
{
Expand Down Expand Up @@ -307,14 +308,11 @@ public function set($value)
/**
* Build meta HTML string
*
* @param string $type
* @param string $typeValue
* @param string $content
* @param array $modifiers
* @return string
* @param stdClass $item
* @throws Exception\InvalidArgumentException
* @return string
*/
public function itemToString(\stdClass $item)
public function itemToString(stdClass $item)
{
if (!in_array($item->type, $this->typeKeys)) {
throw new Exception\InvalidArgumentException(sprintf(
Expand Down Expand Up @@ -409,7 +407,7 @@ public function toString($indent = null)
*/
public function createData($type, $typeValue, $content, array $modifiers)
{
$data = new \stdClass;
$data = new stdClass;
$data->type = $type;
$data->$type = $typeValue;
$data->content = $content;
Expand Down
5 changes: 3 additions & 2 deletions src/Helper/HeadScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

namespace Zend\View\Helper;

use stdClass;
use Zend\View;
use Zend\View\Exception;

Expand Down Expand Up @@ -275,7 +276,7 @@ protected function isDuplicate($file)
*/
protected function isValid($value)
{
if ((!$value instanceof \stdClass)
if ((!$value instanceof stdClass)
|| !isset($value->type)
|| (!isset($value->source) && !isset($value->attributes)))
{
Expand Down Expand Up @@ -485,7 +486,7 @@ public function toString($indent = null)
*/
public function createData($type, array $attributes, $content = null)
{
$data = new \stdClass();
$data = new stdClass();
$data->type = $type;
$data->attributes = $attributes;
$data->source = $content;
Expand Down
12 changes: 6 additions & 6 deletions src/Helper/HeadStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

namespace Zend\View\Helper;

use stdClass;
use Zend\View;
use Zend\View\Exception;

Expand Down Expand Up @@ -162,12 +163,11 @@ public function __call($method, $args)
* Determine if a value is a valid style tag
*
* @param mixed $value
* @param string $method
* @return boolean
*/
protected function isValid($value)
{
if ((!$value instanceof \stdClass)
if ((!$value instanceof stdClass)
|| !isset($value->content)
|| !isset($value->attributes))
{
Expand Down Expand Up @@ -251,8 +251,8 @@ public function set($value)
/**
* Start capture action
*
* @param mixed $captureType
* @param string $typeOrAttrs
* @param string $type
* @param string $attrs
* @return void
* @throws Exception\RuntimeException
*/
Expand Down Expand Up @@ -301,7 +301,7 @@ public function captureEnd()
* @param string $indent Indentation to use
* @return string
*/
public function itemToString(\stdClass $item, $indent)
public function itemToString(stdClass $item, $indent)
{
$attrString = '';
if (!empty($item->attributes)) {
Expand Down Expand Up @@ -399,7 +399,7 @@ public function createData($content, array $attributes)
$attributes['media'] = implode(',', $attributes['media']);
}

$data = new \stdClass();
$data = new stdClass();
$data->content = $content;
$data->attributes = $attributes;

Expand Down
2 changes: 1 addition & 1 deletion src/Helper/HeadTitle.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function __invoke($title = null, $setType = null)
* Set a default order to add titles
*
* @param string $setType
* @return void
* @return HeadTitle
* @throws Exception\DomainException
*/
public function setDefaultAttachOrder($setType)
Expand Down
1 change: 1 addition & 0 deletions src/Helper/HtmlList.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class HtmlList extends AbstractHtmlElement
* @param array $items Array with the elements of the list
* @param boolean $ordered Specifies ordered/unordered list; default unordered
* @param array $attribs Attributes for the ol/ul tag.
* @param boolean $escape Escape the items.
* @return string The list XHTML.
*/
public function __invoke(array $items, $ordered = false, $attribs = false, $escape = true)
Expand Down
1 change: 1 addition & 0 deletions src/Helper/Layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public function __invoke($template = null)
/**
* Get the root view model
*
* @throws Exception\RuntimeException
* @return null|Model
*/
protected function getRoot()
Expand Down
6 changes: 3 additions & 3 deletions src/Helper/Navigation/AbstractHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ abstract class AbstractHelper extends View\Helper\AbstractHtmlElement implements
/**
* ACL role to use when iterating pages
*
* @var string|Acl\Role
* @var string|Acl\Role\RoleInterface
*/
protected $role;

Expand Down Expand Up @@ -127,7 +127,7 @@ abstract class AbstractHelper extends View\Helper\AbstractHtmlElement implements
* Default ACL role to use when iterating pages if not explicitly set in the
* instance by calling {@link setRole()}
*
* @var string|Acl\Role
* @var string|Acl\Role\RoleInterface
*/
protected static $defaultRole;

Expand Down Expand Up @@ -485,7 +485,7 @@ public function __toString()
* {@link getMinDepth()}. A
* null value means no minimum
* depth required.
* @param int|null $minDepth [optional] maximum depth
* @param int|null $maxDepth [optional] maximum depth
* a page can have to be
* valid. Default is to use
* {@link getMaxDepth()}. A
Expand Down
2 changes: 1 addition & 1 deletion src/Helper/Navigation/Breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Breadcrumbs extends AbstractHelper
* Helper entry point
*
* @param string|AbstractContainer $container container to operate on
* @return Navigation
* @return Breadcrumbs
*/
public function __invoke($container = null)
{
Expand Down
3 changes: 2 additions & 1 deletion src/Helper/Navigation/Links.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ public function getRenderFlag()
* </code>
*
* @param AbstractPage $page page to find links for
* @param null|int $flag
* @return array related pages
*/
public function findAllRelations(AbstractPage $page, $flag = null)
Expand Down Expand Up @@ -728,7 +729,7 @@ public function renderLink(AbstractPage $page, $attrib, $relation)
*
* Implements {@link HelperInterface::render()}.
*
* @param AbstractContainer string|$container [optional] container to render.
* @param AbstractContainer|string|null $container [optional] container to render.
* Default is to render the
* container registered in the
* helper.
Expand Down
27 changes: 14 additions & 13 deletions src/Helper/Navigation/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,13 @@ protected function normalizeOptions(array $options = array())
* Renders the deepest active menu within [$minDepth, $maxDepth], (called
* from {@link renderMenu()})
*
* @param AbstractContainer $container container to render
* @param array $active active page and depth
* @param string $ulClass CSS class for first UL
* @param string $indent initial indentation
* @param int|null $minDepth minimum depth
* @param int|null $maxDepth maximum depth
* @return string rendered menu
* @param AbstractContainer $container container to render
* @param string $ulClass CSS class for first UL
* @param string $indent initial indentation
* @param int|null $minDepth minimum depth
* @param int|null $maxDepth maximum depth
* @param bool $escapeLabels Whether or not to escape the labels
* @return string rendered menu
*/
protected function renderDeepestMenu(AbstractContainer $container,
$ulClass,
Expand Down Expand Up @@ -367,12 +367,13 @@ protected function renderDeepestMenu(AbstractContainer $container,
/**
* Renders a normal menu (called from {@link renderMenu()})
*
* @param AbstractContainer $container container to render
* @param string $ulClass CSS class for first UL
* @param string $indent initial indentation
* @param int|null $minDepth minimum depth
* @param int|null $maxDepth maximum depth
* @param bool $onlyActive render only active branch?
* @param AbstractContainer $container container to render
* @param string $ulClass CSS class for first UL
* @param string $indent initial indentation
* @param int|null $minDepth minimum depth
* @param int|null $maxDepth maximum depth
* @param bool $onlyActive render only active branch?
* @param bool $escapeLabels Whether or not to escape the labels
* @return string
*/
protected function renderNormalMenu(AbstractContainer $container,
Expand Down
10 changes: 5 additions & 5 deletions src/Helper/Navigation/Sitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class Sitemap extends AbstractHelper
* Helper entry point
*
* @param string|AbstractContainer $container container to operate on
* @return Navigation
* @return Sitemap
*/
public function __invoke($container = null)
{
Expand Down Expand Up @@ -444,10 +444,10 @@ public function getDomSitemap(AbstractContainer $container = null)
*
* Implements {@link HelperInterface::render()}.
*
* @param link|AbstractContainer $container [optional] container to render. Default is
* to render the container registered in the
* helper.
* @return string helper output
* @param AbstractContainer $container [optional] container to render. Default is
* to render the container registered in the
* helper.
* @return string helper output
*/
public function render($container = null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Helper/PaginationControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static function getDefaultScrollingStyle()
/**
* Sets the default Scrolling Style
*
* @param type $style string 'all' | 'elastic' | 'sliding' | 'jumping'
* @param string $style string 'all' | 'elastic' | 'sliding' | 'jumping'
*/
public static function setDefaultScrollingStyle($style)
{
Expand Down
4 changes: 3 additions & 1 deletion src/Helper/Placeholder/Container/AbstractContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ public function getWhitespace($indent)
/**
* Start capturing content to push into placeholder
*
* @param int $type How to capture content into placeholder; append, prepend, or set
* @param string $type How to capture content into placeholder; append, prepend, or set
* @param mixed $key Key to which to capture content
* @return void
* @throws Exception\RuntimeException if nested captures detected
*/
Expand Down Expand Up @@ -337,6 +338,7 @@ public function nextIndex()
/**
* Render the placeholder
*
* @param null|int|string $indent
* @return string
*/
public function toString($indent = null)
Expand Down
4 changes: 2 additions & 2 deletions src/Helper/Placeholder/Container/AbstractStandalone.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ abstract class AbstractStandalone
/**
* Flag whether to automatically escape output, must also be
* enforced in the child class if __toString/toString is overridden
* @var book
* @var bool
*/
protected $autoEscape = true;

Expand Down Expand Up @@ -308,7 +308,7 @@ public function offsetUnset($offset)
/**
* IteratorAggregate: get Iterator
*
* @return Iterator
* @return \Iterator
*/
public function getIterator()
{
Expand Down
Loading

0 comments on commit 006ef75

Please sign in to comment.