@@ -161,7 +161,7 @@ |
||
| 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 | } |
@@ -84,7 +84,7 @@ |
||
| 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': |
@@ -41,7 +41,7 @@ |
||
| 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; |
@@ -154,7 +154,7 @@ discard block |
||
| 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 |
||
| 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()) { |
@@ -91,7 +91,7 @@ |
||
| 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); |
@@ -55,7 +55,7 @@ |
||
| 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); |
@@ -20,7 +20,7 @@ |
||
| 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); |
@@ -15,8 +15,8 @@ discard block |
||
| 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 |
||
| 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" |
@@ -59,7 +59,7 @@ |
||
| 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 | } |