Passed
Push — master ( b64db2...8c639f )
by Jens
02:21
created
src/components/FormComponent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@
 block discarded – undo
161 161
 		if (isset($_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID])) {
162 162
 			$this->formId = $_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID];
163 163
 		} else {
164
-			$_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID] = (string)microtime(true);
164
+			$_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID] = (string) microtime(true);
165 165
 			$_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName]['submitted'] = false;
166 166
 			$this->formId = $_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID];
167 167
 		}
Please login to merge, or discard this patch.
src/components/cms/SearchRouting.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 	 */
85 85
 	private function stepRouting($step, $cmsComponent, $indexer)
86 86
 	{
87
-		switch($step) {
87
+		switch ($step) {
88 88
 			case 'resetIndex': $indexer->resetIndex(); break;
89 89
 			case 'cleanPublishedDeletedDocuments': $cmsComponent->storage->getDocuments()->cleanPublishedDeletedDocuments(); break;
90 90
 			case 'createDocumentTermCount':
Please login to merge, or discard this patch.
src/components/cms/DocumentRouting.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
     {
42 42
 		if ($relativeCmsUri == '/documents/new-document' && isset($request::$get[CmsComponent::GET_PARAMETER_PATH])) {
43 43
 			$this->documentNewRoute($request, $cmsComponent);
44
-		} elseif (isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])){
44
+		} elseif (isset($request::$get[CmsComponent::GET_PARAMETER_SLUG])) {
45 45
 			switch ($relativeCmsUri) {
46 46
 				case '/documents/edit-document': $this->editDocumentRoute($request, $cmsComponent); break;
47 47
 				case '/documents/get-brick': $this->getBrickRoute($request, $cmsComponent); break;
Please login to merge, or discard this patch.
src/search/Search.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 		  GROUP BY term_frequency.documentPath, term_frequency.term
155 155
 		  ORDER BY score DESC
156 156
 		';
157
-		if(!$stmt = $db->prepare($sql)) {
157
+		if (!$stmt = $db->prepare($sql)) {
158 158
 			throw new \Exception('SQLite exception: <pre>' . print_r($db->errorInfo(), true) . '</pre> for SQL:<pre>' . $sql . '</pre>');
159 159
 		}
160 160
 		$stmt->bindValue(':query', $token);
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 			  FROM inverse_document_frequency
219 219
 			 WHERE term IN (' . $terms . ') 
220 220
 		';
221
-		if(!$stmt = $db->prepare($sql)) {
221
+		if (!$stmt = $db->prepare($sql)) {
222 222
 			throw new \Exception('SQLite exception: <pre>' . print_r($db->errorInfo(), true) . '</pre> for SQL:<pre>' . $sql . '</pre>');
223 223
 		}
224 224
 		if (!$stmt->execute()) {
Please login to merge, or discard this patch.
src/search/DocumentTokenizer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
 
92 92
 	private function tokenizeBrick($brick, $brickSlug)
93 93
 	{
94
-		$fields  = $brick->fields;
94
+		$fields = $brick->fields;
95 95
 		$brickDefinition = $this->storage->getBricks()->getBrickBySlug($brick->type);
96 96
 		foreach ($fields as $fieldName => $field) {
97 97
 			$fieldType = $this->getFieldType($fieldName, $brickDefinition);
Please login to merge, or discard this patch.
src/search/indexer/TermFrequency.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 			$i = 0;
56 56
 			foreach ($termsForDocumentField as $term) {
57 57
 				$frequency = intval($term->count) / $documentField->totalTermCount;
58
-				$values[] = $quotedDocumentPath . ','  . $quotedField . ', ' . $db->quote($term->term) . ', ' . $db->quote($frequency);
58
+				$values[] = $quotedDocumentPath . ',' . $quotedField . ', ' . $db->quote($term->term) . ', ' . $db->quote($frequency);
59 59
 				$i += 1;
60 60
 				if ($i >= Indexer::SQLITE_MAX_COMPOUND_SELECT) {
61 61
 					$this->executeStore($sql, $values, $db);
Please login to merge, or discard this patch.
src/cc/StringUtil.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 	public static function slugify($str, $replace = array(), $delimiter = '-')
21 21
 	{
22 22
 		if (!empty($replace)) {
23
-			$str = str_replace((array)$replace, ' ', $str);
23
+			$str = str_replace((array) $replace, ' ', $str);
24 24
 		}
25 25
 
26 26
 		$clean = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $str);
Please login to merge, or discard this patch.
src/cc/errortemplates/errorviewcli.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
 ------------------------------------------------------------------------------------------------------------------------------------------------
16 16
 
17 17
 <?php
18
-foreach($lines as $nr => $currentLine) {
19
-	echo ($nr == $line ? '* ' : '  ' ) . str_pad($nr, 3, "0", STR_PAD_LEFT) . ' ' . $currentLine;
18
+foreach ($lines as $nr => $currentLine) {
19
+	echo ($nr == $line ? '* ' : '  ') . str_pad($nr, 3, "0", STR_PAD_LEFT) . ' ' . $currentLine;
20 20
 }
21 21
 ?>
22 22
 
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 ------------------------------------------------------------------------------------------------------------------------------------------------
26 26
 
27 27
 <?php
28
-foreach($trace as $row) {
28
+foreach ($trace as $row) {
29 29
 	echo (isset($row['file']) ? basename($row['file']) : '') . ':'
30 30
 		. (isset($row['line']) ? $row['line'] : '') . "\t\t\t"
31 31
 		. (isset($row['class']) ? $row['class'] : ' ') . "\t\t\t"
Please login to merge, or discard this patch.
src/cc/Request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 				self::$queryString = $_SERVER['QUERY_STRING'];
60 60
 			}
61 61
 			if (self::$subfolders === '/') {
62
-				self::$relativeUri = str_replace('?' . self::$queryString, '', substr(self::$requestUri,1));
62
+				self::$relativeUri = str_replace('?' . self::$queryString, '', substr(self::$requestUri, 1));
63 63
 			} else {
64 64
 				self::$relativeUri = str_replace('?' . self::$queryString, '', str_replace(self::$subfolders, '', self::$requestUri));
65 65
 			}
Please login to merge, or discard this patch.