@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | */ |
| 184 | 184 | protected function setOrder($name, $field, $type = 'ASC') |
| 185 | 185 | { |
| 186 | - $this->getRequest()->getSession()->set('sort.' . $name, array('field' => $field, 'type' => $type)); |
|
| 186 | + $this->getRequest()->getSession()->set('sort.'.$name, array('field' => $field, 'type' => $type)); |
|
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | /** |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | { |
| 195 | 195 | $session = $this->getRequest()->getSession(); |
| 196 | 196 | |
| 197 | - return $session->has('sort.' . $name) ? $session->get('sort.' . $name) : null; |
|
| 197 | + return $session->has('sort.'.$name) ? $session->get('sort.'.$name) : null; |
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | /** |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | { |
| 206 | 206 | $alias = current($qb->getDQLPart('from'))->getAlias(); |
| 207 | 207 | if (is_array($order = $this->getOrder($name))) { |
| 208 | - $qb->orderBy($alias . '.' . $order['field'], $order['type']); |
|
| 208 | + $qb->orderBy($alias.'.'.$order['field'], $order['type']); |
|
| 209 | 209 | } |
| 210 | 210 | } |
| 211 | 211 | |
@@ -223,11 +223,11 @@ discard block |
||
| 223 | 223 | $request = $this->getRequest(); |
| 224 | 224 | $url = $this->generateUrl($route ?: $name, is_null($params) ? array() : $params); |
| 225 | 225 | if ($request->query->has('submit-filter') && $form->handleRequest($request)->isValid()) { |
| 226 | - $request->getSession()->set('filter.' . $name, $request->query->get($form->getName())); |
|
| 226 | + $request->getSession()->set('filter.'.$name, $request->query->get($form->getName())); |
|
| 227 | 227 | |
| 228 | 228 | return $this->redirect($url); |
| 229 | 229 | } elseif ($request->query->has('reset-filter')) { |
| 230 | - $request->getSession()->set('filter.' . $name, null); |
|
| 230 | + $request->getSession()->set('filter.'.$name, null); |
|
| 231 | 231 | |
| 232 | 232 | return $this->redirect($url); |
| 233 | 233 | } |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | */ |
| 263 | 263 | protected function getFilter($name) |
| 264 | 264 | { |
| 265 | - return $this->getRequest()->getSession()->get('filter.' . $name); |
|
| 265 | + return $this->getRequest()->getSession()->get('filter.'.$name); |
|
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | /** |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | 'class' => 'AppBundle\Entity\Group', |
| 23 | 23 | 'expanded' => true, |
| 24 | 24 | 'multiple' => true, |
| 25 | - 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { |
|
| 25 | + 'apply_filter' => function(QueryInterface $filterQuery, $field, $values) { |
|
| 26 | 26 | $query = $filterQuery->getQueryBuilder(); |
| 27 | 27 | $query->leftJoin($field, 'm'); |
| 28 | 28 | // Filter results using orWhere matching ID |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | protected function setOrder($name, $field, $type = 'ASC') |
| 187 | 187 | { |
| 188 | 188 | $this->getRequest()->getSession()->set( |
| 189 | - 'sort.' . $name, |
|
| 189 | + 'sort.'.$name, |
|
| 190 | 190 | array('field' => $field, 'type' => $type) |
| 191 | 191 | ); |
| 192 | 192 | } |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | { |
| 200 | 200 | $session = $this->getRequest()->getSession(); |
| 201 | 201 | |
| 202 | - return $session->has('sort.' . $name) ? $session->get('sort.' . $name) : null; |
|
| 202 | + return $session->has('sort.'.$name) ? $session->get('sort.'.$name) : null; |
|
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | /** |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | { |
| 211 | 211 | $alias = current($qb->getDQLPart('from'))->getAlias(); |
| 212 | 212 | if (is_array($order = $this->getOrder($name))) { |
| 213 | - $qb->orderBy($alias . '.' . $order['field'], $order['type']); |
|
| 213 | + $qb->orderBy($alias.'.'.$order['field'], $order['type']); |
|
| 214 | 214 | } |
| 215 | 215 | } |
| 216 | 216 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | if ($item->getUri() === $request->getRequestUri()) { |
| 23 | 23 | // URL's completely match |
| 24 | 24 | return true; |
| 25 | - } elseif ($item->getUri() !== $request->getBaseUrl() . '/' && |
|
| 25 | + } elseif ($item->getUri() !== $request->getBaseUrl().'/' && |
|
| 26 | 26 | substr($request->getRequestUri(), 0, strlen($item->getUri())) |
| 27 | 27 | === $item->getUri()) { |
| 28 | 28 | // URL isn't just "/" and the first part of the URL match |