Skip to content

Commit e5a4d85

Browse files
authored
Merge pull request #744 from cakephp/master-docblock-cleanup
Cleanup docblocks.
2 parents db018a7 + d5b38f9 commit e5a4d85

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/Panel/RoutesPanel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ public function summary()
4646
*/
4747
public function shutdown(EventInterface $event)
4848
{
49+
/** @var \Cake\Controller\Controller|null $controller */
4950
$controller = $event->getSubject();
50-
/** @var \Cake\Http\ServerRequest $request */
5151
$request = $controller ? $controller->getRequest() : null;
5252
$this->_data = [
5353
'matchedRoute' => $request ? $request->getParam('_matchedRoute') : null,

src/Panel/VariablesPanel.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ protected function _walkDebugInfo(callable $walker, $item)
9797
*/
9898
public function shutdown(EventInterface $event)
9999
{
100+
/** @var \Cake\Controller\Controller $controller */
100101
$controller = $event->getSubject();
101102
$errors = [];
102103

@@ -153,9 +154,9 @@ public function shutdown(EventInterface $event)
153154
if ($v instanceof EntityInterface) {
154155
$errors[$k] = $this->_getErrors($v);
155156
} elseif ($v instanceof Form) {
156-
$formError = $v->getErrors();
157-
if (!empty($formError)) {
158-
$errors[$k] = $formError;
157+
$formErrors = $v->getErrors();
158+
if ($formErrors) {
159+
$errors[$k] = $formErrors;
159160
}
160161
}
161162
}

0 commit comments

Comments
 (0)