ErrorMiddleware::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace OCA\Chat\Middleware;
4
5
use \OCP\AppFramework\Middleware;
6
use \OCA\Chat\App\Chat;
7
8
class ErrorMiddleware extends Middleware {
9
10
	/**
11
	 * @var Chat
12
	 */
13
	private $app;
14
15
	public function __construct(Chat $app){
16
		$this->app = $app;
17
	}
18
19
20
	/**
21
	 * this replaces "bad words" with "********" in the output
22
	 */
23
	public function afterException($controller, $methodName, \Exception $e){
24
		$this->app->exceptionHandler($e);
25
	}
26
27
}