@@ -37,7 +37,7 @@ |
||
| 37 | 37 | { |
| 38 | 38 | foreach ($this->datatable->createFinalQuery(array( |
| 39 | 39 | 'start' => 0, |
| 40 | - 'limit' => INF, ))->getQuery()->iterate(null, Query::HYDRATE_SCALAR) as $row) { |
|
| 40 | + 'limit' => INF,))->getQuery()->iterate(null, Query::HYDRATE_SCALAR) as $row) { |
|
| 41 | 41 | $line = $row[0]; |
| 42 | 42 | fwrite($this->resource, implode($this->delimiter, $line)); |
| 43 | 43 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $temp = array( |
| 98 | 98 | 'columns' => array(), |
| 99 | 99 | ); |
| 100 | - array_map(function () use ($filters, &$temp) { |
|
| 100 | + array_map(function() use ($filters, &$temp) { |
|
| 101 | 101 | $temp['columns'][] = array( |
| 102 | 102 | 'search' => array( |
| 103 | 103 | 'value' => $filters['search'][Column::GLOBAL_ALIAS], |
@@ -129,8 +129,7 @@ discard block |
||
| 129 | 129 | $temp = '('.$this->columns[$index]->where($this->final_query, $filter['search']['value']).')'; |
| 130 | 130 | |
| 131 | 131 | $this->columns[$index]->isHaving() ? |
| 132 | - $having .= (!empty($having) ? ' AND ' : '').$temp : |
|
| 133 | - $where .= (!empty($where) ? ' '.($this->globalSearch ? 'OR' : 'AND').' ' : '').$temp; |
|
| 132 | + $having .= (!empty($having) ? ' AND ' : '').$temp : $where .= (!empty($where) ? ' '.($this->globalSearch ? 'OR' : 'AND').' ' : '').$temp; |
|
| 134 | 133 | } |
| 135 | 134 | } |
| 136 | 135 | |
@@ -209,8 +208,7 @@ discard block |
||
| 209 | 208 | ->getScalarResult(); |
| 210 | 209 | |
| 211 | 210 | return !empty($result) ? |
| 212 | - (int) $result[0]['count'] : |
|
| 213 | - 0; |
|
| 211 | + (int) $result[0]['count'] : 0; |
|
| 214 | 212 | } |
| 215 | 213 | |
| 216 | 214 | /** |
@@ -236,8 +234,7 @@ discard block |
||
| 236 | 234 | } |
| 237 | 235 | |
| 238 | 236 | $conditions = isset($filters['columns']) ? |
| 239 | - $this->createCondition($filters) : |
|
| 240 | - array(); |
|
| 237 | + $this->createCondition($filters) : array(); |
|
| 241 | 238 | |
| 242 | 239 | if (isset($conditions['where']) && !empty($conditions['where'])) { |
| 243 | 240 | $this->final_query->andWhere($conditions['where']); |
@@ -300,11 +297,9 @@ discard block |
||
| 300 | 297 | $this->createQueryResult(); |
| 301 | 298 | $this->orderBy( |
| 302 | 299 | isset($filters['order']) ? |
| 303 | - $filters['order'][0]['column'] : |
|
| 304 | - 0, |
|
| 300 | + $filters['order'][0]['column'] : 0, |
|
| 305 | 301 | isset($filters['order']) ? |
| 306 | - $filters['order'][0]['dir'] : |
|
| 307 | - 'ASC' |
|
| 302 | + $filters['order'][0]['dir'] : 'ASC' |
|
| 308 | 303 | ); |
| 309 | 304 | |
| 310 | 305 | return $this->createFoundationQuery($filters); |