Passed
Push — develop ( 546638...4b1aa8 )
by Jens
02:46
created
cloudcontrol/library/cc/Application.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
 		 */
66 66
 		private function config()
67 67
 		{
68
-			$configPath = __DIR__ . '/../../config.json';
68
+			$configPath = __DIR__.'/../../config.json';
69 69
 			if (realpath($configPath) !== false) {
70 70
 				$json = file_get_contents($configPath);
71 71
 				$this->config = json_decode($json);
72 72
 			} else {
73
-				throw new \Exception('Couldn\'t find config file in path ' . $configPath);
73
+				throw new \Exception('Couldn\'t find config file in path '.$configPath);
74 74
 			}
75 75
 		}
76 76
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 		private function sitemapMatching($request)
94 94
 		{
95 95
 			$sitemap = $this->storage->getSitemap();
96
-			$relativeUri = '/' . $request::$relativeUri;
96
+			$relativeUri = '/'.$request::$relativeUri;
97 97
 
98 98
 			foreach ($sitemap as $sitemapItem) {
99 99
 				if ($sitemapItem->regex) {
@@ -156,17 +156,17 @@  discard block
 block discarded – undo
156 156
 		 * @return mixed
157 157
 		 * @throws \Exception
158 158
 		 */
159
-		private function getComponentObject($class='', $template='', $parameters=array(), $matchedSitemapItem)
159
+		private function getComponentObject($class = '', $template = '', $parameters = array(), $matchedSitemapItem)
160 160
 		{
161
-			$libraryComponentName = '\\library\\components\\' . $class;
162
-			$userComponentName = '\\components\\' . $class;
161
+			$libraryComponentName = '\\library\\components\\'.$class;
162
+			$userComponentName = '\\components\\'.$class;
163 163
 			
164 164
 			if (\autoLoad($libraryComponentName, false)) {
165 165
 				$component = new $libraryComponentName($template, $this->request, $parameters, $matchedSitemapItem);
166 166
 			} elseif (\autoLoad($userComponentName, false)) {
167 167
 				$component = new $userComponentName($template, $this->request, $parameters, $matchedSitemapItem);
168 168
 			} else {
169
-				throw new \Exception('Could not load component ' . $class);
169
+				throw new \Exception('Could not load component '.$class);
170 170
 			}
171 171
 			
172 172
 			if (!$component instanceof Component) {
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 		{
194 194
 			foreach ($this->matchedSitemapItems as $sitemapItem) {
195 195
 				header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + (60 * 60 * 24 * 2))); // 2 days
196
-				header("Cache-Control: max-age=" . (60 * 60 * 24 * 2));
196
+				header("Cache-Control: max-age=".(60 * 60 * 24 * 2));
197 197
 				$sitemapItem->object->render();
198 198
 				ob_clean();
199 199
 				echo $sitemapItem->object->get();
Please login to merge, or discard this patch.