We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | $query = Solr::escapeQueryKeepField($query, $this->conf['pages']); |
| 41 | 41 | |
| 42 | - if ($query == null) { |
|
| 42 | + if ($query == NULL) { |
|
| 43 | 43 | throw new Exception('Missing query argument'); |
| 44 | 44 | return ''; |
| 45 | 45 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | foreach ($levelArray as $key => $item) { |
| 77 | 77 | |
| 78 | - if ($item !== null) { |
|
| 78 | + if ($item !== NULL) { |
|
| 79 | 79 | $subQuery = $item; |
| 80 | 80 | $title = $titles[$subQuery]; |
| 81 | 81 | |
@@ -83,10 +83,10 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | $counter = count($subResults); |
| 85 | 85 | if ($counter > 1) { |
| 86 | - $childrenAvailable = true; |
|
| 86 | + $childrenAvailable = TRUE; |
|
| 87 | 87 | $linkAttrArray = array("href" => ""); |
| 88 | 88 | } else { |
| 89 | - $childrenAvailable = false; |
|
| 89 | + $childrenAvailable = FALSE; |
|
| 90 | 90 | $linkAttrArray = array("href" => $key); |
| 91 | 91 | } |
| 92 | 92 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $title = trim($item, $explodeChar); |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - $newLevelArray[] = array("id" => $level . '#' . trim($subQuery), "text" => $title, "children" => $childrenAvailable, "a_attr" => $linkAttrArray, "icon" => false); |
|
| 108 | + $newLevelArray[] = array("id" => $level . '#' . trim($subQuery), "text" => $title, "children" => $childrenAvailable, "a_attr" => $linkAttrArray, "icon" => FALSE); |
|
| 109 | 109 | } |
| 110 | 110 | } |
| 111 | 111 | |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | if ($level == 0) { |
| 147 | 147 | foreach ($collectionNames as $collectionName) { |
| 148 | - $newLevelArray[] = array("id" => "0##" . $collectionName, "text" => $collectionName, "children" => true, "a_attr" => array("href" => ""), "icon" => false); |
|
| 148 | + $newLevelArray[] = array("id" => "0##" . $collectionName, "text" => $collectionName, "children" => TRUE, "a_attr" => array("href" => ""), "icon" => FALSE); |
|
| 149 | 149 | } |
| 150 | 150 | } else { |
| 151 | 151 | |
@@ -189,9 +189,9 @@ discard block |
||
| 189 | 189 | |
| 190 | 190 | $newLevelArray[] = array("id" => "1#" . $groupKey . "#".$groupKey, |
| 191 | 191 | "text" => $text, |
| 192 | - "children" => true, |
|
| 192 | + "children" => TRUE, |
|
| 193 | 193 | "a_attr" => array("href" => ""), |
| 194 | - "icon" => false); |
|
| 194 | + "icon" => FALSE); |
|
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | } else { |
@@ -203,9 +203,9 @@ discard block |
||
| 203 | 203 | |
| 204 | 204 | $newLevelArray[] = array("id" => "2#" . $document->record_id . "#".$groupKey, |
| 205 | 205 | "text" => $text, |
| 206 | - "children" => false, |
|
| 206 | + "children" => FALSE, |
|
| 207 | 207 | "a_attr" => array("href" => $document->purl), |
| 208 | - "icon" => false); |
|
| 208 | + "icon" => FALSE); |
|
| 209 | 209 | } |
| 210 | 210 | } |
| 211 | 211 | |
@@ -47,14 +47,14 @@ discard block |
||
| 47 | 47 | $solrField = $this->conf['field']; |
| 48 | 48 | $explodeChar = $this->conf['explode']; |
| 49 | 49 | |
| 50 | - $params['sort'] = array($solrField => 'asc'); |
|
| 50 | + $params['sort'] = array ($solrField => 'asc'); |
|
| 51 | 51 | |
| 52 | 52 | $solr->params = $params; |
| 53 | 53 | |
| 54 | - $results = $solr->search_raw($solrField . ':' . $query . ''); |
|
| 54 | + $results = $solr->search_raw($solrField.':'.$query.''); |
|
| 55 | 55 | |
| 56 | - $levelArray = array(); |
|
| 57 | - $titles = array(); |
|
| 56 | + $levelArray = array (); |
|
| 57 | + $titles = array (); |
|
| 58 | 58 | |
| 59 | 59 | foreach ($results as $document) { |
| 60 | 60 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | $concatLevels = ""; |
| 64 | 64 | for ($i = 0; $i <= $level; $i++) { |
| 65 | - $concatLevels .= $exploded[$i] . $explodeChar; |
|
| 65 | + $concatLevels .= $exploded[$i].$explodeChar; |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | $levelArray[$document->purl] = $concatLevels; |
@@ -79,15 +79,15 @@ discard block |
||
| 79 | 79 | $subQuery = $item; |
| 80 | 80 | $title = $titles[$subQuery]; |
| 81 | 81 | |
| 82 | - $subResults = $solr->search_raw($solrField . ':"' . $subQuery . '"'); |
|
| 82 | + $subResults = $solr->search_raw($solrField.':"'.$subQuery.'"'); |
|
| 83 | 83 | |
| 84 | 84 | $counter = count($subResults); |
| 85 | 85 | if ($counter > 1) { |
| 86 | 86 | $childrenAvailable = true; |
| 87 | - $linkAttrArray = array("href" => ""); |
|
| 87 | + $linkAttrArray = array ("href" => ""); |
|
| 88 | 88 | } else { |
| 89 | 89 | $childrenAvailable = false; |
| 90 | - $linkAttrArray = array("href" => $key); |
|
| 90 | + $linkAttrArray = array ("href" => $key); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | if ($level == 0) { |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $title = trim($item, $explodeChar); |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - $newLevelArray[] = array("id" => $level . '#' . trim($subQuery), "text" => $title, "children" => $childrenAvailable, "a_attr" => $linkAttrArray, "icon" => false); |
|
| 108 | + $newLevelArray[] = array ("id" => $level.'#'.trim($subQuery), "text" => $title, "children" => $childrenAvailable, "a_attr" => $linkAttrArray, "icon" => false); |
|
| 109 | 109 | } |
| 110 | 110 | } |
| 111 | 111 | |
@@ -145,11 +145,11 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | if ($level == 0) { |
| 147 | 147 | foreach ($collectionNames as $collectionName) { |
| 148 | - $newLevelArray[] = array("id" => "0##" . $collectionName, "text" => $collectionName, "children" => true, "a_attr" => array("href" => ""), "icon" => false); |
|
| 148 | + $newLevelArray[] = array ("id" => "0##".$collectionName, "text" => $collectionName, "children" => true, "a_attr" => array ("href" => ""), "icon" => false); |
|
| 149 | 149 | } |
| 150 | 150 | } else { |
| 151 | 151 | |
| 152 | - $selectParams = array( |
|
| 152 | + $selectParams = array ( |
|
| 153 | 153 | 'rows' => 0 |
| 154 | 154 | ); |
| 155 | 155 | |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | if ($level == 1) { |
| 167 | 167 | |
| 168 | 168 | for ($i = $from; $i <= $till; $i = $i + $gap) { |
| 169 | - $groupComponent->addQuery($field . ':[' . ($i - $gap) . ' TO ' . ($i - 1) . ']'); |
|
| 169 | + $groupComponent->addQuery($field.':['.($i - $gap).' TO '.($i - 1).']'); |
|
| 170 | 170 | } |
| 171 | 171 | } else { |
| 172 | 172 | $groupComponent->addQuery($query); |
@@ -183,14 +183,14 @@ discard block |
||
| 183 | 183 | if ($level == 1) { |
| 184 | 184 | |
| 185 | 185 | unset($matches[0]); |
| 186 | - $text = implode(' ' . $this->conf['regexOutputDelimiter'] . ' ', $matches); |
|
| 186 | + $text = implode(' '.$this->conf['regexOutputDelimiter'].' ', $matches); |
|
| 187 | 187 | |
| 188 | 188 | if (!empty($text)) { |
| 189 | 189 | |
| 190 | - $newLevelArray[] = array("id" => "1#" . $groupKey . "#".$groupKey, |
|
| 190 | + $newLevelArray[] = array ("id" => "1#".$groupKey."#".$groupKey, |
|
| 191 | 191 | "text" => $text, |
| 192 | 192 | "children" => true, |
| 193 | - "a_attr" => array("href" => ""), |
|
| 193 | + "a_attr" => array ("href" => ""), |
|
| 194 | 194 | "icon" => false); |
| 195 | 195 | } |
| 196 | 196 | |
@@ -201,10 +201,10 @@ discard block |
||
| 201 | 201 | $outputField = $this->conf['leafFieldOutput']; |
| 202 | 202 | $text = $document->$outputField; |
| 203 | 203 | |
| 204 | - $newLevelArray[] = array("id" => "2#" . $document->record_id . "#".$groupKey, |
|
| 204 | + $newLevelArray[] = array ("id" => "2#".$document->record_id."#".$groupKey, |
|
| 205 | 205 | "text" => $text, |
| 206 | 206 | "children" => false, |
| 207 | - "a_attr" => array("href" => $document->purl), |
|
| 207 | + "a_attr" => array ("href" => $document->purl), |
|
| 208 | 208 | "icon" => false); |
| 209 | 209 | } |
| 210 | 210 | } |
@@ -52,12 +52,12 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | $script = " |
| 55 | - <div id=\"" . $id . "\" class=\"\"></div> |
|
| 55 | + <div id=\"" . $id."\" class=\"\"></div> |
|
| 56 | 56 | |
| 57 | 57 | <script> |
| 58 | 58 | |
| 59 | 59 | // ajax demo |
| 60 | - $('#" . $id . "').jstree({ |
|
| 60 | + $('#" . $id."').jstree({ |
|
| 61 | 61 | 'core' : { |
| 62 | 62 | 'themes': { |
| 63 | 63 | 'responsive': true |
@@ -73,16 +73,16 @@ discard block |
||
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | if (level === \"\") { |
| 76 | - level = " . $level . "; |
|
| 76 | + level = " . $level."; |
|
| 77 | 77 | } else { |
| 78 | 78 | level = parseInt(level) + 1; |
| 79 | 79 | } |
| 80 | 80 | if (query === \"\") { |
| 81 | - query = '" . $query . "'; |
|
| 81 | + query = '" . $query."'; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | if (typeof level == \"number\") { |
| 85 | - return '" . $requestUri . "&tx_dlf[apikey]=" . $apiKey . "&tx_dlf[query]=' + query + '&tx_dlf[level]='+level+'&tx_dlf[collection]='+collection; |
|
| 85 | + return '" . $requestUri."&tx_dlf[apikey]=".$apiKey."&tx_dlf[query]=' + query + '&tx_dlf[level]='+level+'&tx_dlf[collection]='+collection; |
|
| 86 | 86 | } |
| 87 | 87 | }, |
| 88 | 88 | \"dataType\" : \"json\" // needed only if you do not supply JSON headers |
@@ -32,8 +32,7 @@ |
||
| 32 | 32 | * |
| 33 | 33 | * @return string The content that is displayed on the website |
| 34 | 34 | */ |
| 35 | - public function main($content, $conf) |
|
| 36 | - { |
|
| 35 | + public function main($content, $conf) { |
|
| 37 | 36 | |
| 38 | 37 | $this->init($conf); |
| 39 | 38 | |