Passed
Push — develop ( ca5759...96efe9 )
by Jens
02:44
created
src/components/cms/configuration/UsersRouting.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_CONFIGURATION);
57 57
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_USERNAME])) {
58 58
 			$cmsComponent->storage->getUsers()->addUser($request::$post);
59
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/users');
59
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/users');
60 60
 			exit;
61 61
 		}
62 62
 	}
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	private function deleteRoute($request, $cmsComponent)
69 69
 	{
70 70
 		$cmsComponent->storage->getUsers()->deleteUserBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
71
-		header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/users');
71
+		header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/users');
72 72
 		exit;
73 73
 	}
74 74
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_USER, $cmsComponent->storage->getUsers()->getUserBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]));
84 84
 		if (isset($_POST[CmsComponent::POST_PARAMETER_USERNAME])) {
85 85
 			$cmsComponent->storage->getUsers()->saveUser($request::$get[CmsComponent::GET_PARAMETER_SLUG], $request::$post);
86
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/users');
86
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/users');
87 87
 			exit;
88 88
 		}
89 89
 	}
Please login to merge, or discard this patch.
src/components/cms/configuration/DocumentTypeRouting.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		$bricks = $cmsComponent->storage->getBricks()->getBricks();
57 57
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE])) {
58 58
 			$cmsComponent->storage->getDocumentTypes()->addDocumentType($request::$post);
59
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/document-types');
59
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/document-types');
60 60
 			exit;
61 61
 		}
62 62
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_BRICKS, $bricks);
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		$bricks = $cmsComponent->storage->getBricks()->getBricks();
75 75
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE])) {
76 76
 			$cmsComponent->storage->getDocumentTypes()->saveDocumentType($request::$get[CmsComponent::GET_PARAMETER_SLUG], $request::$post);
77
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/document-types');
77
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/document-types');
78 78
 			exit;
79 79
 		}
80 80
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_DOCUMENT_TYPE, $documentType);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	private function deleteRoute($request, $cmsComponent)
89 89
 	{
90 90
 		$cmsComponent->storage->getDocumentTypes()->deleteDocumentTypeBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
91
-		header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/document-types');
91
+		header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/document-types');
92 92
 		exit;
93 93
 	}
94 94
 }
95 95
\ No newline at end of file
Please login to merge, or discard this patch.
src/components/cms/configuration/ImageSetRouting.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		$imageSet = $cmsComponent->storage->getImageSet()->getImageSetBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
57 57
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE])) {
58 58
 			$cmsComponent->storage->getImageSet()->saveImageSet($request::$get[CmsComponent::GET_PARAMETER_SLUG], $request::$post);
59
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/image-set');
59
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/image-set');
60 60
 			exit;
61 61
 		}
62 62
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_IMAGE_SET, $imageSet);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_CONFIGURATION);
73 73
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE])) {
74 74
 			$cmsComponent->storage->getImageSet()->addImageSet($request::$post);
75
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/image-set');
75
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/image-set');
76 76
 			exit;
77 77
 		}
78 78
 	}
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	private function deleteRoute($request, $cmsComponent)
85 85
 	{
86 86
 		$cmsComponent->storage->getImageSet()->deleteImageSetBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
87
-		header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/image-set');
87
+		header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/image-set');
88 88
 		exit;
89 89
 	}
90 90
 }
91 91
\ No newline at end of file
Please login to merge, or discard this patch.
src/components/cms/configuration/BricksRouting.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_CONFIGURATION);
56 56
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE])) {
57 57
 			$cmsComponent->storage->getBricks()->addBrick($request::$post);
58
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/bricks');
58
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/bricks');
59 59
 			exit;
60 60
 		}
61 61
 	}
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		$brick = $cmsComponent->storage->getBricks()->getBrickBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
72 72
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE])) {
73 73
 			$cmsComponent->storage->getBricks()->saveBrick($request::$get[CmsComponent::GET_PARAMETER_SLUG], $request::$post);
74
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/bricks');
74
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/bricks');
75 75
 			exit;
76 76
 		}
77 77
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_BRICK, $brick);
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	private function deleteRoute($request, $cmsComponent)
85 85
 	{
86 86
 		$cmsComponent->storage->getBricks()->deleteBrickBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
87
-		header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/bricks');
87
+		header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/bricks');
88 88
 		exit;
89 89
 	}
90 90
 }
91 91
\ No newline at end of file
Please login to merge, or discard this patch.
src/components/cms/ImagesRouting.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_IMAGES);
65 65
 		if (isset($_FILES[CmsComponent::FILES_PARAMETER_FILE])) {
66 66
 			$cmsComponent->storage->getImages()->addImage($_FILES[CmsComponent::FILES_PARAMETER_FILE]);
67
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/images');
67
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/images');
68 68
 			exit;
69 69
 		}
70 70
 	}
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	private function deleteRoute($request, $cmsComponent)
77 77
 	{
78 78
 		$cmsComponent->storage->getImages()->deleteImageByName($request::$get[CmsComponent::FILES_PARAMETER_FILE]);
79
-		header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/images');
79
+		header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/images');
80 80
 		exit;
81 81
 	}
82 82
 
Please login to merge, or discard this patch.
src/components/cms/SitemapRouting.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_SITEMAP);
60 60
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$post[CmsComponent::POST_PARAMETER_TEMPLATE], $request::$post[CmsComponent::POST_PARAMETER_COMPONENT])) {
61 61
 			$cmsComponent->storage->getSitemap()->addSitemapItem($request::$post);
62
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/sitemap');
62
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/sitemap');
63 63
 			exit;
64 64
 		}
65 65
 	}
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		$sitemapItem = $cmsComponent->storage->getSitemap()->getSitemapItemBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
76 76
 		if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$post[CmsComponent::POST_PARAMETER_TEMPLATE], $request::$post[CmsComponent::POST_PARAMETER_COMPONENT])) {
77 77
 			$cmsComponent->storage->getSitemap()->saveSitemapItem($request::$get[CmsComponent::GET_PARAMETER_SLUG], $request::$post);
78
-			header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/sitemap');
78
+			header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/sitemap');
79 79
 			exit;
80 80
 		}
81 81
 		$cmsComponent->setParameter(CmsComponent::PARAMETER_SITEMAP_ITEM, $sitemapItem);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	private function deleteRoute($request, $cmsComponent)
89 89
 	{
90 90
 		$cmsComponent->storage->getSitemap()->deleteSitemapItemBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
91
-		header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/sitemap');
91
+		header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/sitemap');
92 92
 		exit;
93 93
 	}
94 94
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_SITEMAP);
119 119
         if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$post[CmsComponent::POST_PARAMETER_FROM_URL], $request::$post[CmsComponent::POST_PARAMETER_TO_URL])) {
120 120
             $cmsComponent->storage->getRedirects()->addRedirect($request::$post);
121
-            header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/sitemap/redirects');
121
+            header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/sitemap/redirects');
122 122
             exit;
123 123
         }
124 124
     }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         $redirect = $cmsComponent->storage->getRedirects()->getRedirectBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
131 131
         if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$post[CmsComponent::POST_PARAMETER_FROM_URL], $request::$post[CmsComponent::POST_PARAMETER_TO_URL])) {
132 132
             $cmsComponent->storage->getRedirects()->saveRedirect($request::$get[CmsComponent::GET_PARAMETER_SLUG], $request::$post);
133
-            header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/sitemap/redirects');
133
+            header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/sitemap/redirects');
134 134
             exit;
135 135
         }
136 136
         $cmsComponent->setParameter(CmsComponent::PARAMETER_REDIRECT, $redirect);
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     private function redirectDeleteRoute($request, $cmsComponent)
140 140
     {
141 141
         $cmsComponent->storage->getRedirects()->deleteRedirectBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]);
142
-        header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/sitemap/redirects');
142
+        header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/sitemap/redirects');
143 143
         exit;
144 144
     }
145 145
 }
146 146
\ No newline at end of file
Please login to merge, or discard this patch.
src/components/DocumentComponent.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 			if (isset($this->parameters['document'])) {
86 86
 				$this->runByDocumentParameter();
87 87
 			} else {
88
-				throw new \Exception('When not using a regex, you need to set the parameter `document` with the path to the document in this sitemap item: ' . $this->matchedSitemapItem->title);
88
+				throw new \Exception('When not using a regex, you need to set the parameter `document` with the path to the document in this sitemap item: '.$this->matchedSitemapItem->title);
89 89
 			}
90 90
 		}
91 91
 
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
 				$relativeDocumentUri = current($this->matchedSitemapItem->matches[1]);
103 103
 				if (isset($this->parameters['folder'])) {
104 104
 					if (substr($this->parameters['folder'], -1) !== '/') {
105
-						$this->parameters['folder'] = $this->parameters['folder'] . '/';
105
+						$this->parameters['folder'] = $this->parameters['folder'].'/';
106 106
 					}
107
-					$relativeDocumentUri = $this->parameters['folder'] . $relativeDocumentUri;
107
+					$relativeDocumentUri = $this->parameters['folder'].$relativeDocumentUri;
108 108
 				}
109 109
 
110 110
 				$document = $this->storage->getDocuments()->getDocumentBySlug($relativeDocumentUri);
Please login to merge, or discard this patch.
src/components/FormComponent.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 		if (isset($_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID])) {
163 163
 			$this->formId = $_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID];
164 164
 		} else {
165
-			$_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID] = (string)microtime(true);
165
+			$_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID] = (string) microtime(true);
166 166
 			$_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName]['submitted'] = false;
167 167
 			$this->formId = $_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID];
168 168
 		}
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 		$postValues = $request::$post;
191 191
 		$postValues[self::PARAMETER_DOCUMENT_TYPE] = $this->documentType;
192 192
 		$postValues[self::GET_PARAMETER_PATH] = $this->responseFolder;
193
-		$postValues['title'] = date('r') . ' - From: ' . $request::$requestUri;
193
+		$postValues['title'] = date('r').' - From: '.$request::$requestUri;
194 194
 
195 195
 		return $postValues;
196 196
 	}
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 	private function setFormParameter($form)
326 326
 	{
327 327
 		if ($this->isFormSubmitted($this->request) || $this->isSubmitAllowed() === false) {
328
-			$this->parameters[$this->formParameterName] = '<a name="' . $this->formId . '"></a>' . $this->thankYouMessage;
328
+			$this->parameters[$this->formParameterName] = '<a name="'.$this->formId.'"></a>'.$this->thankYouMessage;
329 329
 		} else {
330 330
 			$this->parameters[$this->formParameterName] = $form;
331 331
 		}
Please login to merge, or discard this patch.
src/search/indexer/TermFrequency.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 			$i = 0;
53 53
 			foreach ($termsForDocumentField as $term) {
54 54
 				$frequency = intval($term->count) / $documentField->totalTermCount;
55
-				$values[] = $quotedDocumentPath . ','  . $quotedField . ', ' . $db->quote($term->term) . ', ' . $db->quote($frequency);
55
+				$values[] = $quotedDocumentPath.','.$quotedField.', '.$db->quote($term->term).', '.$db->quote($frequency);
56 56
 				$i += 1;
57 57
 				if ($i >= Indexer::SQLITE_MAX_COMPOUND_SELECT) {
58 58
 					$this->executeStore($sql, $values, $db);
@@ -101,11 +101,11 @@  discard block
 block discarded – undo
101 101
 
102 102
 	private function executeStore($sql, $values, $db)
103 103
 	{
104
-		$sql .= '(' . implode('),' . PHP_EOL . '(', $values) . ');';
104
+		$sql .= '('.implode('),'.PHP_EOL.'(', $values).');';
105 105
 		if (!$db->query($sql)) {
106 106
 			$errorInfo = $db->errorInfo();
107 107
 			$errorMsg = $errorInfo[2];
108
-			throw new \Exception('SQLite Exception: ' . $errorMsg . ' in SQL: <br /><pre>' . $sql . '</pre>');
108
+			throw new \Exception('SQLite Exception: '.$errorMsg.' in SQL: <br /><pre>'.$sql.'</pre>');
109 109
 		}
110 110
 	}
111 111
 
Please login to merge, or discard this patch.