Completed
Push — master ( 81a3ac...528ffa )
by Joas
27:15 queued 10:28
created
lib/private/AppFramework/App.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 /**
4 4
  * @copyright Copyright (c) 2016, ownCloud, Inc.
5 5
  *
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
 	 * the transformed app id, defaults to OCA\
57 57
 	 * @return string the starting namespace for the app
58 58
 	 */
59
-	public static function buildAppNamespace(string $appId, string $topNamespace='OCA\\'): string {
59
+	public static function buildAppNamespace(string $appId, string $topNamespace = 'OCA\\'): string {
60 60
 		// Hit the cache!
61 61
 		if (isset(self::$nameSpaceCache[$appId])) {
62
-			return $topNamespace . self::$nameSpaceCache[$appId];
62
+			return $topNamespace.self::$nameSpaceCache[$appId];
63 63
 		}
64 64
 
65 65
 		$appInfo = \OC_App::getAppInfo($appId);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 			self::$nameSpaceCache[$appId] = ucfirst($appId);
71 71
 		}
72 72
 
73
-		return $topNamespace . self::$nameSpaceCache[$appId];
73
+		return $topNamespace.self::$nameSpaceCache[$appId];
74 74
 	}
75 75
 
76 76
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 		// first try $controllerName then go for \OCA\AppName\Controller\$controllerName
94 94
 		try {
95 95
 			$controller = $container->query($controllerName);
96
-		} catch(QueryException $e) {
96
+		} catch (QueryException $e) {
97 97
 			if ($appName === 'core') {
98 98
 				$appNameSpace = 'OC\\Core';
99 99
 			} else if ($appName === 'settings') {
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 			} else {
102 102
 				$appNameSpace = self::buildAppNamespace($appName);
103 103
 			}
104
-			$controllerName = $appNameSpace . '\\Controller\\' . $controllerName;
104
+			$controllerName = $appNameSpace.'\\Controller\\'.$controllerName;
105 105
 			$controller = $container->query($controllerName);
106 106
 		}
107 107
 
@@ -119,17 +119,17 @@  discard block
 block discarded – undo
119 119
 
120 120
 		$io = $container[IOutput::class];
121 121
 
122
-		if(!is_null($httpHeaders)) {
122
+		if (!is_null($httpHeaders)) {
123 123
 			$io->setHeader($httpHeaders);
124 124
 		}
125 125
 
126
-		foreach($responseHeaders as $name => $value) {
127
-			$io->setHeader($name . ': ' . $value);
126
+		foreach ($responseHeaders as $name => $value) {
127
+			$io->setHeader($name.': '.$value);
128 128
 		}
129 129
 
130
-		foreach($responseCookies as $name => $value) {
130
+		foreach ($responseCookies as $name => $value) {
131 131
 			$expireDate = null;
132
-			if($value['expireDate'] instanceof \DateTime) {
132
+			if ($value['expireDate'] instanceof \DateTime) {
133 133
 				$expireDate = $value['expireDate']->getTimestamp();
134 134
 			}
135 135
 			$io->setCookie(
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 			if ($response instanceof ICallbackResponse) {
154 154
 				$response->callback($io);
155 155
 			} else if (!is_null($output)) {
156
-				$io->setHeader('Content-Length: ' . strlen($output));
156
+				$io->setHeader('Content-Length: '.strlen($output));
157 157
 				$io->setOutput($output);
158 158
 			}
159 159
 		}
@@ -173,14 +173,14 @@  discard block
 block discarded – undo
173 173
 	 * @param DIContainer $container an instance of a pimple container.
174 174
 	 */
175 175
 	public static function part(string $controllerName, string $methodName, array $urlParams,
176
-								DIContainer $container){
176
+								DIContainer $container) {
177 177
 
178 178
 		$container['urlParams'] = $urlParams;
179 179
 		$controller = $container[$controllerName];
180 180
 
181 181
 		$dispatcher = $container['Dispatcher'];
182 182
 
183
-		list(, , $output) =  $dispatcher->dispatch($controller, $methodName);
183
+		list(,, $output) = $dispatcher->dispatch($controller, $methodName);
184 184
 		return $output;
185 185
 	}
186 186
 
Please login to merge, or discard this patch.
lib/public/AppFramework/App.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 /**
4 4
  * @copyright Copyright (c) 2016, ownCloud, Inc.
5 5
  *
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	 * @return string the starting namespace for the app
61 61
 	 * @since 8.0.0
62 62
 	 */
63
-	public static function buildAppNamespace(string $appId, string $topNamespace='OCA\\'): string {
63
+	public static function buildAppNamespace(string $appId, string $topNamespace = 'OCA\\'): string {
64 64
 		return \OC\AppFramework\App::buildAppNamespace($appId, $topNamespace);
65 65
 	}
66 66
 
Please login to merge, or discard this patch.