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

Commit 0c6c9a1

Browse files
committed
Updated PHPDocs
- added missing param tags - added missing return void - fixed typos - fixed types
1 parent c02ba35 commit 0c6c9a1

7 files changed

+29
-8
lines changed

src/NamespacedPathStackResolver.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public function __construct($options = null)
6161
*
6262
* @param string $path
6363
* @param string $namespace
64+
* @return void
6465
* @throws ViewException\InvalidArgumentException for an invalid path
6566
* @throws ViewException\InvalidArgumentException for an invalid namespace
6667
*/
@@ -94,6 +95,7 @@ public function addPath($path, $namespace = self::DEFAULT_NAMESPACE)
9495
* Add many paths to the stack at once.
9596
*
9697
* @param array $paths
98+
* @return void
9799
*/
98100
public function addPaths(array $paths)
99101
{
@@ -110,6 +112,7 @@ public function addPaths(array $paths)
110112
* Overwrite all existing paths with the provided paths.
111113
*
112114
* @param array|Traversable $paths
115+
* @return void
113116
* @throws ViewException\InvalidArgumentException for invalid path types.
114117
*/
115118
public function setPaths($paths)
@@ -131,6 +134,8 @@ public function setPaths($paths)
131134

132135
/**
133136
* Clear all paths.
137+
*
138+
* @return void
134139
*/
135140
public function clearPaths()
136141
{
@@ -140,9 +145,9 @@ public function clearPaths()
140145
/**
141146
* Retrieve the filesystem path to a view script
142147
*
143-
* @param string $name
144-
* @param null|RendererInterface $renderer
145-
* @return string
148+
* @param string $name
149+
* @param null|RendererInterface $renderer
150+
* @return false|string
146151
* @throws ViewException\DomainException
147152
*/
148153
public function resolve($name, RendererInterface $renderer = null)

src/ServerUrlHelper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public function __invoke($path = null)
4545
/**
4646
* Proxies to `Zend\Expressive\Helper\ServerUrlHelper::setUri()`
4747
* @param UriInterface $uri
48+
* @return void
4849
*/
4950
public function setUri(UriInterface $uri)
5051
{

src/UrlHelper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ public function __construct(BaseHelper $helper)
2929
* Proxies to `Zend\Expressive\Helper\UrlHelper::generate()`
3030
*
3131
* @param null|string $routeName
32-
* @param array $routeParams
33-
* @param array $queryParams
32+
* @param array $routeParams
33+
* @param array $queryParams
3434
* @param null|string $fragmentIdentifier
35-
* @param array $options Can have the following keys:
35+
* @param array $options Can have the following keys:
3636
* - router (array): contains options to be passed to the router
3737
* - reuse_result_params (bool): indicates if the current RouteResult
3838
* parameters will be used, defaults to true

src/ZendViewRenderer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ public function render($name, $params = [])
135135
*
136136
* @param string $path
137137
* @param string $namespace
138+
* @return void
138139
*/
139140
public function addPath($path, $namespace = null)
140141
{
@@ -230,7 +231,7 @@ private function createRenderer()
230231
/**
231232
* Get the default resolver
232233
*
233-
* @return NamespacedPathStackResolver
234+
* @return AggregateResolver
234235
*/
235236
private function getDefaultResolver()
236237
{
@@ -245,6 +246,7 @@ private function getDefaultResolver()
245246
* A priority of 0 is used, to ensure it is the last queried.
246247
*
247248
* @param AggregateResolver $aggregate
249+
* @return void
248250
*/
249251
private function injectNamespacedResolver(AggregateResolver $aggregate)
250252
{

src/ZendViewRendererFactory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ZendViewRendererFactory
4949
{
5050
/**
5151
* @param ContainerInterface $container
52-
* @returns ZendViewRenderer
52+
* @return ZendViewRenderer
5353
*/
5454
public function __invoke(ContainerInterface $container)
5555
{
@@ -95,6 +95,8 @@ public function __invoke(ContainerInterface $container)
9595
*
9696
* @param PhpRenderer $renderer
9797
* @param ContainerInterface $container
98+
* @return void
99+
* @throws Exception\MissingHelperException
98100
*/
99101
private function injectHelpers(PhpRenderer $renderer, ContainerInterface $container)
100102
{

test/ZendViewRendererFactoryTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ public function testCallingFactoryWithNoConfigReturnsZendViewInstance()
134134

135135
/**
136136
* @depends testCallingFactoryWithNoConfigReturnsZendViewInstance
137+
*
138+
* @param ZendViewRenderer $view
137139
*/
138140
public function testUnconfiguredZendViewInstanceContainsNoPaths(ZendViewRenderer $view)
139141
{
@@ -271,6 +273,8 @@ public function testWillUseHelperManagerFromContainer()
271273

272274
/**
273275
* @depends testWillUseHelperManagerFromContainer
276+
*
277+
* @param HelperPluginManager $helpers
274278
*/
275279
public function testInjectsCustomHelpersIntoHelperManagerFromContainer(HelperPluginManager $helpers)
276280
{

test/ZendViewRendererTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ public function invalidParameterValues()
140140

141141
/**
142142
* @dataProvider invalidParameterValues
143+
*
144+
* @param mixed $params
143145
*/
144146
public function testRenderRaisesExceptionForInvalidParameterTypes($params)
145147
{
@@ -172,6 +174,9 @@ public function objectParameterValues()
172174

173175
/**
174176
* @dataProvider objectParameterValues
177+
*
178+
* @param object $params
179+
* @param string $search
175180
*/
176181
public function testCanRenderWithParameterObjects($params, $search)
177182
{
@@ -345,6 +350,8 @@ public function useArrayOrViewModel()
345350

346351
/**
347352
* @dataProvider useArrayOrViewModel
353+
*
354+
* @param bool $viewAsModel
348355
*/
349356
public function testOverrideSharedParametersAtRender($viewAsModel)
350357
{

0 commit comments

Comments
 (0)