ErrorController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 7
ccs 3
cts 3
cp 1
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A beforeRender() 0 5 1
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