Skip to content

Commit bedae54

Browse files
committed
fixed phpDoc
1 parent cbf9be5 commit bedae54

File tree

11 files changed

+28
-21
lines changed

11 files changed

+28
-21
lines changed

src/Application/Application.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Application
4747
/** @var Request[] */
4848
private $requests = [];
4949

50-
/** @var IPresenter */
50+
/** @var IPresenter|NULL */
5151
private $presenter;
5252

5353
/** @var Nette\Http\IRequest */
@@ -193,7 +193,7 @@ public function getRequests()
193193

194194
/**
195195
* Returns current presenter.
196-
* @return IPresenter
196+
* @return IPresenter|NULL
197197
*/
198198
public function getPresenter()
199199
{

src/Application/MicroPresenter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class MicroPresenter implements Application\IPresenter
3030
/** @var Application\IRouter|NULL */
3131
private $router;
3232

33-
/** @var Application\Request */
33+
/** @var Application\Request|NULL */
3434
private $request;
3535

3636

@@ -44,7 +44,7 @@ public function __construct(Nette\DI\Container $context = NULL, Http\IRequest $h
4444

4545
/**
4646
* Gets the context.
47-
* @return Nette\DI\Container
47+
* @return Nette\DI\Container|NULL
4848
*/
4949
public function getContext()
5050
{
@@ -153,7 +153,7 @@ public function error($message = NULL, $httpCode = Http\IResponse::S404_NOT_FOUN
153153

154154

155155
/**
156-
* @return Nette\Application\Request
156+
* @return Nette\Application\Request|NULL
157157
*/
158158
public function getRequest()
159159
{

src/Application/PresenterFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function formatPresenterClass($presenter)
136136
/**
137137
* Formats presenter name from class name.
138138
* @param string
139-
* @return string
139+
* @return string|NULL
140140
* @internal
141141
*/
142142
public function unformatPresenterClass($class)
@@ -148,6 +148,7 @@ public function unformatPresenterClass($class)
148148
. preg_replace("#$mapping[1]#iA", '$1:', $matches[1]) . $matches[3];
149149
}
150150
}
151+
return NULL;
151152
}
152153

153154
}

src/Application/Routers/CliRouter.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,10 @@ public function match(Nette\Http\IRequest $httpRequest)
9595

9696
/**
9797
* This router is only unidirectional.
98-
* @return NULL
98+
* @return void
9999
*/
100100
public function constructUrl(Application\Request $appRequest, Nette\Http\Url $refUrl)
101101
{
102-
return NULL;
103102
}
104103

105104

src/Application/Routers/RouteList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class RouteList extends Nette\Utils\ArrayList implements Nette\Application\IRout
1818
/** @var array */
1919
private $cachedRoutes;
2020

21-
/** @var string */
21+
/** @var string|NULL */
2222
private $module;
2323

2424

@@ -121,7 +121,7 @@ public function offsetSet($index, $route)
121121

122122

123123
/**
124-
* @return string
124+
* @return string|NULL
125125
*/
126126
public function getModule()
127127
{

src/Application/UI/ComponentReflection.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,18 @@ public function getAnnotation($name)
266266
}
267267

268268

269+
/**
270+
* @return MethodReflection
271+
*/
269272
public function getMethod($name)
270273
{
271274
return new MethodReflection($this->getName(), $name);
272275
}
273276

274277

278+
/**
279+
* @return MethodReflection[]
280+
*/
275281
public function getMethods($filter = -1)
276282
{
277283
foreach ($res = parent::getMethods($filter) as $key => $val) {

src/Application/UI/ITemplate.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ function render();
2222

2323
/**
2424
* Sets the path to the template file.
25-
* @return void
25+
* @param string
26+
* @return static
2627
*/
2728
function setFile($file);
2829

2930
/**
3031
* Returns the path to the template file.
31-
* @return string
32+
* @return string|NULL
3233
*/
3334
function getFile();
3435

src/Application/UI/Presenter.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ abstract class Presenter extends Control implements Application\IPresenter
4646
/** @var callable[] function (Presenter $sender, IResponse $response = NULL); Occurs when the presenter is shutting down */
4747
public $onShutdown;
4848

49-
/** @var Nette\Application\Request */
49+
/** @var Nette\Application\Request|NULL */
5050
private $request;
5151

5252
/** @var Nette\Application\IResponse */
@@ -91,7 +91,7 @@ abstract class Presenter extends Control implements Application\IPresenter
9191
/** @var bool */
9292
private $startupCheck;
9393

94-
/** @var Nette\Application\Request */
94+
/** @var Nette\Application\Request|NULL */
9595
private $lastCreatedRequest;
9696

9797
/** @var array */
@@ -132,7 +132,7 @@ public function __construct()
132132

133133

134134
/**
135-
* @return Nette\Application\Request
135+
* @return Nette\Application\Request|NULL
136136
*/
137137
public function getRequest()
138138
{
@@ -472,7 +472,7 @@ public function sendTemplate()
472472

473473
/**
474474
* Finds layout template file name.
475-
* @return string
475+
* @return string|NULL
476476
* @internal
477477
*/
478478
public function findLayoutTemplateFile()
@@ -709,7 +709,7 @@ public function backlink()
709709

710710
/**
711711
* Returns the last created Request.
712-
* @return Nette\Application\Request
712+
* @return Nette\Application\Request|NULL
713713
* @internal
714714
*/
715715
public function getLastCreatedRequest()
@@ -775,7 +775,7 @@ public function lastModified($lastModified, $etag = NULL, $expire = NULL)
775775
* @param string destination in format "[//] [[[module:]presenter:]action | signal! | this] [#fragment]"
776776
* @param array array of arguments
777777
* @param string forward|redirect|link
778-
* @return string URL
778+
* @return string|NULL URL
779779
* @throws InvalidLinkException
780780
* @internal
781781
*/

src/Bridges/ApplicationLatte/Template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function setFile($file)
130130

131131

132132
/**
133-
* @return string
133+
* @return string|NULL
134134
*/
135135
public function getFile()
136136
{

src/Bridges/ApplicationLatte/UIMacros.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* - {link destination ...} control link
2222
* - {plink destination ...} presenter link
2323
* - {snippet ?} ... {/snippet ?} control snippet
24-
* - n:once
24+
* - n:nonce
2525
*/
2626
class UIMacros extends Latte\Macros\MacroSet
2727
{

0 commit comments

Comments
 (0)