Success::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 7
rs 9.4285
cc 1
eloc 5
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 Success extends JSONResponse{
13
14
	public function __construct($requestType, $action, $data=array()){
15
		$data["status"] = "success";
16
		parent::__construct(array(
17
			"type" => $requestType . "::" . $action . "::response" ,
18
			"data" => $data
19
		));
20
	}
21
}