Skip to content

Commit ea20999

Browse files
committed
removed usage of magic methods and properties
1 parent 9604fe3 commit ea20999

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Application/ErrorPresenter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(ILogger $logger = NULL)
3232
*/
3333
public function run(Application\Request $request)
3434
{
35-
$e = $request->parameters['exception'];
35+
$e = $request->getParameter('exception');
3636
if ($e instanceof Application\BadRequestException) {
3737
$code = $e->getCode();
3838
} else {

src/Bridges/ApplicationTracy/RoutingPanel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ private function findSource()
138138
$rc = new \ReflectionClass($class);
139139

140140
if ($rc->isSubclassOf(Nette\Application\UI\Presenter::class)) {
141-
if (isset($request->parameters[Presenter::SIGNAL_KEY])) {
142-
$method = $class::formatSignalMethod($request->parameters[Presenter::SIGNAL_KEY]);
141+
if ($request->getParameter(Presenter::SIGNAL_KEY)) {
142+
$method = $class::formatSignalMethod($request->getParameter(Presenter::SIGNAL_KEY));
143143

144-
} elseif (isset($request->parameters[Presenter::ACTION_KEY])) {
145-
$action = $request->parameters[Presenter::ACTION_KEY];
144+
} elseif ($request->getParameter(Presenter::ACTION_KEY)) {
145+
$action = $request->getParameter(Presenter::ACTION_KEY);
146146
$method = $class::formatActionMethod($action);
147147
if (!$rc->hasMethod($method)) {
148148
$method = $class::formatRenderMethod($action);

0 commit comments

Comments
 (0)