@@ -173,7 +173,7 @@ |
||
| 173 | 173 | * @param ContentObjectRenderer $parentObject parent content object |
| 174 | 174 | */ |
| 175 | 175 | public function postProcessContentObjectInitialization( |
| 176 | - ContentObjectRenderer &$parentObject |
|
| 176 | + ContentObjectRenderer & $parentObject |
|
| 177 | 177 | ) { |
| 178 | 178 | if (!empty($parentObject->currentRecord)) { |
| 179 | 179 | list($table) = explode(':', $parentObject->currentRecord); |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | ); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - return '[' . (int) $filterParts[1] . ' TO ' . (int) $filterParts[2] . ']'; |
|
| 80 | + return '[' . (int)$filterParts[1] . ' TO ' . (int)$filterParts[2] . ']'; |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /** |
@@ -165,10 +165,10 @@ |
||
| 165 | 165 | // direct access for small paths |
| 166 | 166 | case 1: |
| 167 | 167 | $this->data[$pathArray[0]] = $value; |
| 168 | - return; |
|
| 168 | + return; |
|
| 169 | 169 | case 2: |
| 170 | 170 | $this->data[$pathArray[0]][$pathArray[1]] = $value; |
| 171 | - return; |
|
| 171 | + return; |
|
| 172 | 172 | default: |
| 173 | 173 | $this->setDeepElementWithLoop($pathArray, $value); |
| 174 | 174 | } |
@@ -247,12 +247,12 @@ |
||
| 247 | 247 | protected function getPathAsArray($path) |
| 248 | 248 | { |
| 249 | 249 | if (!$this->includePathSeparatorInKeys) { |
| 250 | - $pathArray = explode($this->pathSeparator, $path); |
|
| 250 | + $pathArray = explode($this->pathSeparator, $path); |
|
| 251 | 251 | return $pathArray; |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | $substitutedPath = str_replace($this->pathSeparator, $this->pathSeparator . '@@@', trim($path)); |
| 255 | - $pathArray = array_filter(explode('@@@', $substitutedPath)); |
|
| 255 | + $pathArray = array_filter(explode('@@@', $substitutedPath)); |
|
| 256 | 256 | return $pathArray; |
| 257 | 257 | } |
| 258 | 258 | } |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | if (isset($cropConfiguration['cropFullWords'])) { |
| 63 | - $this->cropFullWords = (boolean) $cropConfiguration ['cropFullWords']; |
|
| 63 | + $this->cropFullWords = (boolean)$cropConfiguration ['cropFullWords']; |
|
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
@@ -53,14 +53,14 @@ |
||
| 53 | 53 | public function execute(array $arguments = array()) |
| 54 | 54 | { |
| 55 | 55 | try { |
| 56 | - $iterator = unserialize($arguments[0]); |
|
| 56 | + $iterator = unserialize($arguments[0]); |
|
| 57 | 57 | } catch (\Exception $e) { |
| 58 | 58 | $iterator = []; |
| 59 | 59 | } |
| 60 | 60 | if ($iterator === false) { |
| 61 | 61 | $iterator = []; |
| 62 | 62 | } |
| 63 | - $variable = $arguments[1]; |
|
| 63 | + $variable = $arguments[1]; |
|
| 64 | 64 | |
| 65 | 65 | $data = ''; |
| 66 | 66 | foreach ($iterator as $value) { |
@@ -218,7 +218,7 @@ |
||
| 218 | 218 | $ucHelperKey = Util::underscoredToUpperCamelCase($helperKey); |
| 219 | 219 | $vendorNameSpace = 'ApacheSolrForTypo3\\Solr\\'; |
| 220 | 220 | $possibleFilename = $ucHelperKey . '.php'; |
| 221 | - $possibleClassName = $vendorNameSpace . str_replace('/', '\\', |
|
| 221 | + $possibleClassName = $vendorNameSpace . str_replace('/', '\\', |
|
| 222 | 222 | $viewHelperRealPath) . '\\' . $ucHelperKey; |
| 223 | 223 | |
| 224 | 224 | $viewHelperIncludePath = ExtensionManagementUtility::extPath($extensionKey) |
@@ -1152,7 +1152,7 @@ |
||
| 1152 | 1152 | } |
| 1153 | 1153 | |
| 1154 | 1154 | /** |
| 1155 | - * @param $templateContent |
|
| 1155 | + * @param string $templateContent |
|
| 1156 | 1156 | * @return mixed |
| 1157 | 1157 | */ |
| 1158 | 1158 | public function setTemplateContent($templateContent) |
@@ -46,9 +46,9 @@ discard block |
||
| 46 | 46 | public function getSearchStatistics($rootPageId, $days = 30, $limit = 10) |
| 47 | 47 | { |
| 48 | 48 | $now = time(); |
| 49 | - $timeStart = (int) ($now - 86400 * intval($days)); // 86400 seconds/day |
|
| 50 | - $rootPageId = (int) $rootPageId; |
|
| 51 | - $limit = (int) $limit; |
|
| 49 | + $timeStart = (int)($now - 86400 * intval($days)); // 86400 seconds/day |
|
| 50 | + $rootPageId = (int)$rootPageId; |
|
| 51 | + $limit = (int)$limit; |
|
| 52 | 52 | |
| 53 | 53 | $statisticsRows = $this->getDatabase()->exec_SELECTgetRows( |
| 54 | 54 | 'keywords, count(keywords) as count, num_found as hits', |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $sumCount += $statisticsRow['count']; |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - $statisticsRows = array_map(function ($row) use ($sumCount) { |
|
| 69 | + $statisticsRows = array_map(function($row) use ($sumCount) { |
|
| 70 | 70 | $row['percent'] = $row['count'] * 100 / $sumCount; |
| 71 | 71 | |
| 72 | 72 | return $row; |
@@ -112,9 +112,9 @@ discard block |
||
| 112 | 112 | */ |
| 113 | 113 | protected function getTopKeyWordsWithOrWithoutHits($rootPageId, $days = 30, $limit, $withoutHits) |
| 114 | 114 | { |
| 115 | - $rootPageId = (int) $rootPageId; |
|
| 116 | - $limit = (int) $limit; |
|
| 117 | - $withoutHits = (bool) $withoutHits; |
|
| 115 | + $rootPageId = (int)$rootPageId; |
|
| 116 | + $limit = (int)$limit; |
|
| 117 | + $withoutHits = (bool)$withoutHits; |
|
| 118 | 118 | |
| 119 | 119 | $now = time(); |
| 120 | 120 | $timeStart = $now - 86400 * intval($days); // 86400 seconds/day |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | |
| 160 | 160 | // for the hits we need to take the average |
| 161 | 161 | $avgHits = $this->getAverageFromField($mergedRow, $statisticsRow, 'hits'); |
| 162 | - $mergedRow['hits'] = (int) $avgHits; |
|
| 162 | + $mergedRow['hits'] = (int)$avgHits; |
|
| 163 | 163 | |
| 164 | 164 | // for the count we need to take the sum, because it's the sum of searches |
| 165 | 165 | $mergedRow['count'] = $mergedRow['count'] + $statisticsRow['count']; |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | * @param array $statisticsRow |
| 204 | 204 | * @return float|int |
| 205 | 205 | */ |
| 206 | - protected function getAverageFromField(array &$mergedRow, array $statisticsRow, $fieldName) |
|
| 206 | + protected function getAverageFromField(array &$mergedRow, array $statisticsRow, $fieldName) |
|
| 207 | 207 | { |
| 208 | 208 | // when this is the first row we can take it. |
| 209 | 209 | if ($mergedRow['mergedrows'] === 1) { |
@@ -39,9 +39,9 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | protected $configuration; |
| 41 | 41 | |
| 42 | - /** |
|
| 43 | - * @var string |
|
| 44 | - */ |
|
| 42 | + /** |
|
| 43 | + * @var string |
|
| 44 | + */ |
|
| 45 | 45 | protected $prefix; |
| 46 | 46 | |
| 47 | 47 | /** |
@@ -157,7 +157,7 @@ |
||
| 157 | 157 | */ |
| 158 | 158 | public function __construct($keywords, $solrConfiguration = null) |
| 159 | 159 | { |
| 160 | - $keywords = (string) $keywords; |
|
| 160 | + $keywords = (string)$keywords; |
|
| 161 | 161 | if ($solrConfiguration == null) { |
| 162 | 162 | $this->solrConfiguration = Util::getSolrConfiguration(); |
| 163 | 163 | } else { |
@@ -274,7 +274,7 @@ |
||
| 274 | 274 | * Generates a list of page IDs in this site. Attention, this includes |
| 275 | 275 | * all page types! Deleted pages are not included. |
| 276 | 276 | * |
| 277 | - * @param int|string $rootPageId Page ID from where to start collection sub pages |
|
| 277 | + * @param integer $rootPageId Page ID from where to start collection sub pages |
|
| 278 | 278 | * @param int $maxDepth Maximum depth to decend into the site tree |
| 279 | 279 | * @return array Array of pages (IDs) in this site |
| 280 | 280 | */ |