@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | { |
| 48 | 48 | // don't return query if searchString is empty |
| 49 | 49 | if (empty($searchString)) { |
| 50 | - return null; |
|
| 50 | + return NULL; |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | $searchString = $this->escapeQuery(trim($searchString)); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $query['body']['query']['bool']['minimum_should_match'] = "1"; // 1 |
| 58 | 58 | $query['body']['query']['bool']['should'][1]['has_child']['child_type'] = "datastream"; // 1 |
| 59 | 59 | |
| 60 | - $query = $this->resultsFilter($query, false); |
|
| 60 | + $query = $this->resultsFilter($query, FALSE); |
|
| 61 | 61 | |
| 62 | 62 | return $query; |
| 63 | 63 | |
@@ -85,12 +85,12 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | } elseif (!empty($qry) && $key == 'from') { |
| 87 | 87 | |
| 88 | - $dateTime = $this->convertFormDate($qry, false); |
|
| 88 | + $dateTime = $this->convertFormDate($qry, FALSE); |
|
| 89 | 89 | $filter['gte'] = $dateTime->format('Y-m-d'); |
| 90 | 90 | |
| 91 | 91 | } elseif (!empty($qry) && $key == 'till') { |
| 92 | 92 | |
| 93 | - $dateTime = $this->convertFormDate($qry, true); |
|
| 93 | + $dateTime = $this->convertFormDate($qry, TRUE); |
|
| 94 | 94 | $filter['lte'] = $dateTime->format('Y-m-d'); |
| 95 | 95 | |
| 96 | 96 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | - $showDeleted = ($searchArray['showDeleted'] == 'true') ? true : false; |
|
| 105 | + $showDeleted = ($searchArray['showDeleted'] == 'true') ? TRUE : FALSE; |
|
| 106 | 106 | $query = $this->resultsFilter($query, $showDeleted); |
| 107 | 107 | return $query; |
| 108 | 108 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | * @param array Elasticsearch query array |
| 114 | 114 | * @return array Elasticsearch queryFilter array |
| 115 | 115 | */ |
| 116 | - public function resultsFilter($query, $showDeleted = false) |
|
| 116 | + public function resultsFilter($query, $showDeleted = FALSE) |
|
| 117 | 117 | { |
| 118 | 118 | |
| 119 | 119 | $queryFilter = array(); |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | if ($searchResultsFilter['from']) { |
| 141 | 141 | |
| 142 | 142 | $from = date('d.m.Y', $searchResultsFilter['from']); |
| 143 | - $dateTime = $this->convertFormDate($from, false); |
|
| 143 | + $dateTime = $this->convertFormDate($from, FALSE); |
|
| 144 | 144 | $dateFilter['gte'] = $dateTime->format('Y-m-d'); |
| 145 | 145 | unset($searchResultsFilter['from']); |
| 146 | 146 | |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | if ($searchResultsFilter['till']) { |
| 150 | 150 | |
| 151 | 151 | $till = date('d.m.Y', $searchResultsFilter['till']); |
| 152 | - $dateTime = $this->convertFormDate($till, true); |
|
| 152 | + $dateTime = $this->convertFormDate($till, TRUE); |
|
| 153 | 153 | $dateFilter['lte'] = $dateTime->format('Y-m-d'); |
| 154 | 154 | unset($searchResultsFilter['till']); |
| 155 | 155 | |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | // document must be active |
| 175 | - if($showDeleted == false) { |
|
| 175 | + if($showDeleted == FALSE) { |
|
| 176 | 176 | |
| 177 | 177 | $queryFilter['body']['query']['bool']['must'][]['term']['STATE'] = 'A'; |
| 178 | 178 | |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | * @param $date |
| 191 | 191 | * @param bool $fillMax: fills missing values with the maximum possible date if true |
| 192 | 192 | */ |
| 193 | - public function convertFormDate($date, $fillMax = false) |
|
| 193 | + public function convertFormDate($date, $fillMax = FALSE) |
|
| 194 | 194 | { |
| 195 | 195 | if (strlen($dateString) == 4) { |
| 196 | 196 | $year = $dateString; |