ErrorController::beforeRender()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

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