Completed
Pull Request — master (#356)
by Sander
02:25
created
controller/iconcontroller.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
 	 * @NoCSRFRequired
58 58
 	 */
59 59
 	public function getIcon($base64Url, $credentialId) {
60
-		$url = base64_decode(str_replace('_','/', $base64Url));
60
+		$url = base64_decode(str_replace('_', '/', $base64Url));
61 61
 
62
-		if($credentialId) {
62
+		if ($credentialId) {
63 63
 			try {
64 64
 				$credential = $this->credentialService->getCredentialById($credentialId, $this->userId);
65 65
 				$credential = $credential->jsonSerialize();
66
-			} catch (DoesNotExistException $e){
66
+			} catch (DoesNotExistException $e) {
67 67
 				// Credential is not found, continue
68 68
 				$credential = false;
69 69
 			}
@@ -129,12 +129,12 @@  discard block
 block discarded – undo
129 129
 			$pack = explode('/', $path[1])[2];
130 130
 			$mime = mime_content_type($iconPath);
131 131
 			//print_r($path);
132
-			if($mime !== 'directory') {
132
+			if ($mime !== 'directory') {
133 133
 				$icon = [];
134 134
 				$icon['mimetype'] = mime_content_type($iconPath);
135 135
 				$icon['url'] = $this->urlGenerator->linkTo('passman', $path[1]);
136 136
 				$icon['pack'] = $pack;
137
-				if(!isset($icons[$pack])){
137
+				if (!isset($icons[$pack])) {
138 138
 					$icons[$pack] = [];
139 139
 				}
140 140
 				$icons[$pack][] = $icon;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
 				$icon['mimetype'] = mime_content_type($iconPath);
135 135
 				$icon['url'] = $this->urlGenerator->linkTo('passman', $path[1]);
136 136
 				$icon['pack'] = $pack;
137
-				if(!isset($icons[$pack])){
137
+				if(!isset($icons[$pack])) {
138 138
 					$icons[$pack] = [];
139 139
 				}
140 140
 				$icons[$pack][] = $icon;
Please login to merge, or discard this patch.