Failed Conditions
Pull Request — master (#182)
by Sander
04:49
created
controller/filecontroller.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	public function __construct($AppName,
24 24
 								IRequest $request,
25 25
 								$UserId,
26
-								FileService $fileService){
26
+								FileService $fileService) {
27 27
 		parent::__construct($AppName, $request);
28 28
 		$this->userId = $UserId;
29 29
 		$this->fileService = $fileService;
@@ -59,20 +59,20 @@  discard block
 block discarded – undo
59 59
 		return new JSONResponse($this->fileService->deleteFile($file_id, $this->userId));
60 60
 	}
61 61
 
62
-	public function updateFile($file_id, $file_data, $filename){
63
-		try{
62
+	public function updateFile($file_id, $file_data, $filename) {
63
+		try {
64 64
 			$file = $this->fileService->getFile($file_id, $this->userId);
65
-		} catch (\Exception $doesNotExistException){
65
+		} catch (\Exception $doesNotExistException) {
66 66
 
67 67
 		}
68
-		if($file){
69
-			if($file_data) {
68
+		if ($file) {
69
+			if ($file_data) {
70 70
 				$file->setFileData($file_data);
71 71
 			}
72
-			if($filename) {
72
+			if ($filename) {
73 73
 				$file->setFilename($filename);
74 74
 			}
75
-			if($filename || $file_data){
75
+			if ($filename || $file_data) {
76 76
 				new JSONResponse($this->fileService->updateFile($file));
77 77
 			}
78 78
 		}
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	public function __construct($AppName,
24 24
 								IRequest $request,
25 25
 								$UserId,
26
-								FileService $fileService){
26
+								FileService $fileService) {
27 27
 		parent::__construct($AppName, $request);
28 28
 		$this->userId = $UserId;
29 29
 		$this->fileService = $fileService;
@@ -59,20 +59,20 @@  discard block
 block discarded – undo
59 59
 		return new JSONResponse($this->fileService->deleteFile($file_id, $this->userId));
60 60
 	}
61 61
 
62
-	public function updateFile($file_id, $file_data, $filename){
62
+	public function updateFile($file_id, $file_data, $filename) {
63 63
 		try{
64 64
 			$file = $this->fileService->getFile($file_id, $this->userId);
65 65
 		} catch (\Exception $doesNotExistException){
66 66
 
67 67
 		}
68
-		if($file){
68
+		if($file) {
69 69
 			if($file_data) {
70 70
 				$file->setFileData($file_data);
71 71
 			}
72 72
 			if($filename) {
73 73
 				$file->setFilename($filename);
74 74
 			}
75
-			if($filename || $file_data){
75
+			if($filename || $file_data) {
76 76
 				new JSONResponse($this->fileService->updateFile($file));
77 77
 			}
78 78
 		}
Please login to merge, or discard this patch.
controller/internalcontroller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public function remind($credential_id) {
42 42
 		$credential = $this->credentialService->getCredentialById($credential_id, $this->userId);
43
-		if($credential) {
43
+		if ($credential) {
44 44
 			$credential->setExpireTime(time() + (24 * 60 * 60));
45 45
 			$this->credentialService->upd($credential);
46 46
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	public function read($credential_id) {
60 60
 
61 61
 		$credential = $this->credentialService->getCredentialById($credential_id, $this->userId);
62
-		if($credential) {
62
+		if ($credential) {
63 63
 			$credential->setExpireTime(0);
64 64
 			$this->credentialService->upd($credential);
65 65
 
Please login to merge, or discard this patch.