Completed
Push — master ( 82cbc4...aed5b3 )
by Michal
12s
created

ErrorController::beforeRender()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
/* vim: set expandtab sw=4 ts=4 sts=4: */
3
/**
4
 * Error Controller.
5
 *
6
 * This file is error controller file. It is required only because
7
 * AppController::beforeFilter() does not get called in case of errors
8
 * and exceptions.
9
 *
10
 * Ref: https://www.bradezone.com/2009/05/21/cakephp-beforefilter-and-the-error-error/
11
 *
12
 * phpMyAdmin Error reporting server
13
 * Copyright (c) phpMyAdmin project (https://www.phpmyadmin.net/)
14
 *
15
 * Licensed under The MIT License
16
 * For full copyright and license information, please see the LICENSE.txt
17
 * Redistributions of files must retain the above copyright notice.
18
 *
19
 * @copyright Copyright (c) phpMyAdmin project (https://www.phpmyadmin.net/)
20
 * @license   https://opensource.org/licenses/mit-license.php MIT License
21
 *
22
 * @see      https://www.phpmyadmin.net/
23
 */
24
namespace App\Controller;
25
26
use App\Controller\AppController;
27
use Cake\Event\Event;
28
29
class ErrorController extends AppController
30
{
31
32 2
    public function beforeFilter(Event $event)
33
    {
34 2
        parent::beforeFilter($event);
35 2
    }
36
37 2
    public function beforeRender(Event $event)
38
    {
39 2
        parent::beforeRender($event);
40 2
        $this->viewBuilder()->templatePath('Error');
0 ignored issues
show
Deprecated Code introduced by
The method Cake\View\ViewBuilder::templatePath() has been deprecated with message: 3.4.0 Use setTemplatePath()/getTemplatePath() instead.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
41 2
    }
42
43
}
44