Error::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 9
rs 9.6666
cc 1
eloc 6
nc 1
nop 3
1
<?php
2
/**
3
 * Copyright (c) 2014, Tobia De Koninck hey--at--ledfan.be
4
 * This file is licensed under the AGPL version 3 or later.
5
 * See the COPYING file.
6
 */
7
8
namespace OCA\Chat\OCH\Responses;
9
10
use \OCP\AppFramework\Http\JSONResponse;
11
12
class Error extends JSONResponse {
13
14
	public function __construct($requestType, $action, $errorMsg){
15
		parent::__construct(array(
16
			"type" => $requestType . "::" . $action . "::response",
17
			"data" => array(
18
				"status" => "error",
19
				"msg" => $errorMsg
20
			)
21
		));
22
	}
23
}