@@ -94,8 +94,8 @@ |
||
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | - * @depends testCreate |
|
| 98 | - */ |
|
| 97 | + * @depends testCreate |
|
| 98 | + */ |
|
| 99 | 99 | |
| 100 | 100 | public function testSort() { |
| 101 | 101 | $client = static::createClient(); |
@@ -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 |
@@ -1,17 +1,17 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * DefaultController controller de l'application GLSR. |
|
| 4 | - * |
|
| 5 | - * PHP Version 5 |
|
| 6 | - * |
|
| 7 | - * @author Quétier Laurent <[email protected]> |
|
| 8 | - * @copyright 2014 Dev-Int GLSR |
|
| 9 | - * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
|
| 10 | - * |
|
| 11 | - * @version 0.1.0 |
|
| 12 | - * |
|
| 13 | - * @link https://github.com/Dev-Int/glsr |
|
| 14 | - */ |
|
| 3 | + * DefaultController controller de l'application GLSR. |
|
| 4 | + * |
|
| 5 | + * PHP Version 5 |
|
| 6 | + * |
|
| 7 | + * @author Quétier Laurent <[email protected]> |
|
| 8 | + * @copyright 2014 Dev-Int GLSR |
|
| 9 | + * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
|
| 10 | + * |
|
| 11 | + * @version 0.1.0 |
|
| 12 | + * |
|
| 13 | + * @link https://github.com/Dev-Int/glsr |
|
| 14 | + */ |
|
| 15 | 15 | namespace AppBundle\Controller; |
| 16 | 16 | |
| 17 | 17 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
@@ -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 |