Completed
Push — master ( 6fe467...7be40b )
by Marcos
34:25 queued 24:29
created
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.
lib/Service/CronService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,16 +49,16 @@
 block discarded – undo
49 49
 
50 50
 	public function expireCredentials() {
51 51
 		$expired_credentials = $this->credentialService->getExpiredCredentials($this->utils->getTime());
52
-		foreach($expired_credentials as $credential){
52
+		foreach ($expired_credentials as $credential) {
53 53
 			$link = ''; // @TODO create direct link to credential
54 54
 
55 55
 			$sql = 'SELECT count(*) as `rows` from `*PREFIX*notifications` WHERE `subject`= \'credential_expired\' AND object_id=?';
56 56
 			$id = $credential->getId();
57 57
 			$result = $this->db->executeQuery($sql, array($id));
58
-			$this->logger->debug($credential->getLabel() .' is expired, checking notifications!', array('app' => 'passman'));
58
+			$this->logger->debug($credential->getLabel() . ' is expired, checking notifications!', array('app' => 'passman'));
59 59
 			$notifications = intval($result->fetch()['rows']);
60
-			if($notifications === 0) {
61
-				$this->logger->debug($credential->getLabel() .' is expired, adding notification!', array('app' => 'passman'));
60
+			if ($notifications === 0) {
61
+				$this->logger->debug($credential->getLabel() . ' is expired, adding notification!', array('app' => 'passman'));
62 62
 				$this->activityService->add(
63 63
 					Activity::SUBJECT_ITEM_EXPIRED, array($credential->getLabel(), $credential->getUserId()),
64 64
 					'', array(),
Please login to merge, or discard this patch.
lib/AppInfo/Application.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,18 +68,18 @@  discard block
 block discarded – undo
68 68
 
69 69
 		$context->registerSearchProvider(Provider::class);
70 70
 
71
-		$context->registerService(View::class, function () {
71
+		$context->registerService(View::class, function() {
72 72
 			return new View('');
73 73
 		}, false);
74 74
 
75
-		$context->registerService('isCLI', function () {
75
+		$context->registerService('isCLI', function() {
76 76
 			return \OC::$CLI;
77 77
 		});
78 78
 
79 79
 		$context->registerMiddleware(ShareMiddleware::class);
80 80
 		$context->registerMiddleware(APIMiddleware::class);
81 81
 
82
-		$context->registerService('ShareController', function (ContainerInterface $c) {
82
+		$context->registerService('ShareController', function(ContainerInterface $c) {
83 83
 			$server = $this->getContainer()->getServer();
84 84
 			return new ShareController(
85 85
 				$c->get('AppName'),
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 		});
99 99
 
100 100
 
101
-		$context->registerService('CronService', function (ContainerInterface $c) {
101
+		$context->registerService('CronService', function(ContainerInterface $c) {
102 102
 			return new CronService(
103 103
 				$c->get(CredentialService::class),
104 104
 				$c->get(ILogger::class),
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 			);
110 110
 		});
111 111
 
112
-		$context->registerService('Logger', function (ContainerInterface $c) {
112
+		$context->registerService('Logger', function(ContainerInterface $c) {
113 113
 			return $c->get(ServerContainer::class)->getLogger();
114 114
 		});
115 115
 	}
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	public function registerNavigationEntry() {
132 132
 		$c = $this->getContainer();
133 133
 		$server = $c->getServer();
134
-		$navigationEntry = function () use ($c, $server) {
134
+		$navigationEntry = function() use ($c, $server) {
135 135
 			return [
136 136
 				'id' => $c->getAppName(),
137 137
 				'order' => 10,
Please login to merge, or discard this patch.