Completed
Push — master ( dba146...f3ba98 )
by Marcos
06:31
created
lib/Utility/Utils.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -55,20 +55,20 @@
 block discarded – undo
55 55
 	 * @param $uid
56 56
 	 * @return string
57 57
 	 */
58
-	public static function getNameByUid($uid){
58
+	public static function getNameByUid($uid) {
59 59
 		$um = \OC::$server->getUserManager();
60 60
 		$u = $um->get($uid);
61 61
 		return $u->getDisplayName();
62 62
 	}
63 63
 
64
-	public static function getDirContents($dir, &$results = array()){
64
+	public static function getDirContents($dir, &$results = array()) {
65 65
 		$files = scandir($dir);
66 66
 
67
-		foreach($files as $value){
68
-			$path = realpath($dir.DIRECTORY_SEPARATOR.$value);
69
-			if(!is_dir($path)) {
67
+		foreach ($files as $value) {
68
+			$path = realpath($dir . DIRECTORY_SEPARATOR . $value);
69
+			if (!is_dir($path)) {
70 70
 				$results[] = $path;
71
-			} else if($value != "." && $value != "..") {
71
+			} else if ($value != "." && $value != "..") {
72 72
 				Utils::getDirContents($path, $results);
73 73
 				$results[] = $path;
74 74
 			}
Please login to merge, or discard this patch.
controller/translationcontroller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 	public function getLanguageStrings() {
42 42
 		$translations = array(
43 43
 			// js/app/controllers/bookmarklet.js
44
-			'generating.sharing.keys' =>  $this->trans->t('Generating sharing keys ( %s / 2)','%step'),
44
+			'generating.sharing.keys' =>  $this->trans->t('Generating sharing keys ( %s / 2)', '%step'),
45 45
 			'invalid.vault.key' => $this->trans->t('Incorrect vault password!'),
46 46
 			'password.do.not.match' => $this->trans->t('Passwords do not match'),
47 47
 			'general' => $this->trans->t('General'),
Please login to merge, or discard this patch.
controller/iconcontroller.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	 * @NoCSRFRequired
58 58
 	 */
59 59
 	public function getSingleIcon($base64Url) {
60
-		$url = base64_decode(str_replace('_','/', $base64Url));
60
+		$url = base64_decode(str_replace('_', '/', $base64Url));
61 61
 		if (!preg_match("~^(?:f|ht)tps?://~i", $url)) {
62 62
 			$url = "http://" . $url;
63 63
 		}
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
 		$icon = new IconService($url);
67 67
 
68 68
 		if ($icon->icoExists) {
69
-			$icon_json['type']= $icon->icoType;
70
-			$icon_json['content']= base64_encode($icon->icoData);
69
+			$icon_json['type'] = $icon->icoType;
70
+			$icon_json['content'] = base64_encode($icon->icoData);
71 71
 			return new JSONResponse($icon_json);
72 72
 		}
73 73
 
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
 	 * @NoCSRFRequired
80 80
 	 */
81 81
 	public function getIcon($base64Url, $credentialId) {
82
-		$url = base64_decode(str_replace('_','/', $base64Url));
82
+		$url = base64_decode(str_replace('_', '/', $base64Url));
83 83
 
84
-		if($credentialId) {
84
+		if ($credentialId) {
85 85
 			try {
86 86
 				$credential = $this->credentialService->getCredentialById($credentialId, $this->userId);
87 87
 				$credential = $credential->jsonSerialize();
88
-			} catch (DoesNotExistException $e){
88
+			} catch (DoesNotExistException $e) {
89 89
 				// Credential is not found, continue
90 90
 				$credential = false;
91 91
 			}
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 			];
112 112
 			$credential['icon'] = json_encode($iconData);
113 113
 			try {
114
-				if($credential) {
114
+				if ($credential) {
115 115
 					$this->credentialService->updateCredential($credential);
116 116
 				}
117 117
 			} catch (DriverException $exception) {
@@ -152,12 +152,12 @@  discard block
 block discarded – undo
152 152
 			$pack = explode('/', $path[1])[2];
153 153
 			$mime = mime_content_type($iconPath);
154 154
 			//print_r($path);
155
-			if($mime !== 'directory') {
155
+			if ($mime !== 'directory') {
156 156
 				$icon = [];
157 157
 				$icon['mimetype'] = mime_content_type($iconPath);
158 158
 				$icon['url'] = $this->urlGenerator->linkTo('passman', $path[1]);
159 159
 				$icon['pack'] = $pack;
160
-				if(!isset($icons[$pack])){
160
+				if (!isset($icons[$pack])) {
161 161
 					$icons[$pack] = [];
162 162
 				}
163 163
 				$icons[$pack][] = $icon;
Please login to merge, or discard this patch.