Passed
Pull Request — master (#648)
by Julius
08:55
created
lib/Controller/AttachmentApiController.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -31,76 +31,76 @@
 block discarded – undo
31 31
 
32 32
 class AttachmentApiController extends ApiController {
33 33
 
34
-    private $attachmentService;
34
+	private $attachmentService;
35 35
 
36
-    public function __construct($appName, IRequest $request, AttachmentService $attachmentService) {
37
-        parent::__construct($appName, $request);
38
-        $this->attachmentService = $attachmentService;
39
-    }
36
+	public function __construct($appName, IRequest $request, AttachmentService $attachmentService) {
37
+		parent::__construct($appName, $request);
38
+		$this->attachmentService = $attachmentService;
39
+	}
40 40
 
41
-    /**
41
+	/**
42 42
 	 * @NoAdminRequired
43 43
 	 * @CORS
44 44
 	 * @NoCSRFRequired
45 45
 	 *
46 46
 	 */
47
-    public function getAll() {
48
-        $attachment = $this->attachmentService->findAll($this->request->getParam('cardId'));
49
-        return new DataResponse($attachment, HTTP::STATUS_OK);
50
-    }
47
+	public function getAll() {
48
+		$attachment = $this->attachmentService->findAll($this->request->getParam('cardId'));
49
+		return new DataResponse($attachment, HTTP::STATUS_OK);
50
+	}
51 51
 
52
-    /**
52
+	/**
53 53
 	 * @NoAdminRequired
54 54
 	 * @CORS
55 55
 	 * @NoCSRFRequired
56 56
 	 *
57 57
 	 */
58
-    public function display() {
59
-        $attachment = $this->attachmentService->display($this->request->getParam('cardId'), $this->request->getParam('attachmentId'));
58
+	public function display() {
59
+		$attachment = $this->attachmentService->display($this->request->getParam('cardId'), $this->request->getParam('attachmentId'));
60 60
 		return $attachment;
61
-    }
61
+	}
62 62
 
63
-    /**
63
+	/**
64 64
 	 * @NoAdminRequired
65 65
 	 * @CORS
66 66
 	 * @NoCSRFRequired
67 67
 	 *
68 68
 	 */
69
-    public function create($type, $data) {
70
-        $attachment = $this->attachmentService->create($this->request->getParam('cardId'), $type, $data);
71
-        return new DataResponse($attachment, HTTP::STATUS_OK);
72
-    }
69
+	public function create($type, $data) {
70
+		$attachment = $this->attachmentService->create($this->request->getParam('cardId'), $type, $data);
71
+		return new DataResponse($attachment, HTTP::STATUS_OK);
72
+	}
73 73
 
74
-    /**
74
+	/**
75 75
 	 * @NoAdminRequired
76 76
 	 * @CORS
77 77
 	 * @NoCSRFRequired
78 78
 	 *
79 79
 	 */
80
-    public function update($data) {
81
-        $attachment = $this->attachmentService->update($this->request->getParam('cardId'), $this->request->getParam('attachmentId'), $data);
82
-        return new DataResponse($attachment, HTTP::STATUS_OK);
83
-    }
80
+	public function update($data) {
81
+		$attachment = $this->attachmentService->update($this->request->getParam('cardId'), $this->request->getParam('attachmentId'), $data);
82
+		return new DataResponse($attachment, HTTP::STATUS_OK);
83
+	}
84 84
 
85
-    /**
85
+	/**
86 86
 	 * @NoAdminRequired
87 87
 	 * @CORS
88 88
 	 * @NoCSRFRequired
89 89
 	 *
90 90
 	 */
91
-    public function delete() {
92
-        $attachment = $this->attachmentService->delete($this->request->getParam('cardId'), $this->request->getParam('attachmentId'));
93
-        return new DataResponse($attachment, HTTP::STATUS_OK);
94
-    }
91
+	public function delete() {
92
+		$attachment = $this->attachmentService->delete($this->request->getParam('cardId'), $this->request->getParam('attachmentId'));
93
+		return new DataResponse($attachment, HTTP::STATUS_OK);
94
+	}
95 95
 
96
-    /**
96
+	/**
97 97
 	 * @NoAdminRequired
98 98
 	 * @CORS
99 99
 	 * @NoCSRFRequired
100 100
 	 *
101 101
 	 */
102
-    public function restore() {
103
-        $attachment = $this->attachmentService->restore($this->request->getParam('cardId'), $this->request->getParam('attachmentId'));
104
-        return new DataResponse($attachment, HTTP::STATUS_OK);
105
-    }
102
+	public function restore() {
103
+		$attachment = $this->attachmentService->restore($this->request->getParam('cardId'), $this->request->getParam('attachmentId'));
104
+		return new DataResponse($attachment, HTTP::STATUS_OK);
105
+	}
106 106
 }
107 107
\ No newline at end of file
Please login to merge, or discard this patch.