@@ -186,7 +186,7 @@ |
||
186 | 186 | } |
187 | 187 | |
188 | 188 | /** |
189 | - * @param QueryBuilder $qb |
|
189 | + * @param \Doctrine\ORM\QueryBuilder $qb |
|
190 | 190 | * @param string $name |
191 | 191 | */ |
192 | 192 | protected function addQueryBuilderSort(\Doctrine\ORM\QueryBuilder $qb, $name) |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | */ |
172 | 172 | protected function setOrder($name, $field, $type = 'ASC') |
173 | 173 | { |
174 | - $this->getRequest()->getSession()->set('sort.' . $name, array('field' => $field, 'type' => $type)); |
|
174 | + $this->getRequest()->getSession()->set('sort.'.$name, array('field' => $field, 'type' => $type)); |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | /** |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | { |
183 | 183 | $session = $this->getRequest()->getSession(); |
184 | 184 | |
185 | - return $session->has('sort.' . $name) ? $session->get('sort.' . $name) : null; |
|
185 | + return $session->has('sort.'.$name) ? $session->get('sort.'.$name) : null; |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | /** |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | { |
194 | 194 | $alias = current($qb->getDQLPart('from'))->getAlias(); |
195 | 195 | if (is_array($order = $this->getOrder($name))) { |
196 | - $qb->orderBy($alias . '.' . $order['field'], $order['type']); |
|
196 | + $qb->orderBy($alias.'.'.$order['field'], $order['type']); |
|
197 | 197 | } |
198 | 198 | } |
199 | 199 |
@@ -216,7 +216,7 @@ |
||
216 | 216 | * @param string $name route/entity name |
217 | 217 | * @param string $route route name, if different from entity name |
218 | 218 | * @param array $params possible route parameters |
219 | - * @return Response |
|
219 | + * @return \Symfony\Component\HttpFoundation\RedirectResponse|null |
|
220 | 220 | */ |
221 | 221 | protected function saveFilter(FormInterface $form, $name, $route = null, array $params = null) |
222 | 222 | { |
@@ -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 | /** |
@@ -166,7 +166,7 @@ |
||
166 | 166 | /** |
167 | 167 | * Get familylogs |
168 | 168 | * |
169 | - * @return \AppBundle\Entity\FamilyLog |
|
169 | + * @return string |
|
170 | 170 | */ |
171 | 171 | public function getFamilylogs() |
172 | 172 | { |
@@ -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(); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | // URL's completely match |
24 | 24 | return true; |
25 | 25 | } else if ( |
26 | - $item->getUri() !== $request->getBaseUrl() . '/' && |
|
26 | + $item->getUri() !== $request->getBaseUrl().'/' && |
|
27 | 27 | substr($request->getRequestUri(), 0, strlen($item->getUri())) |
28 | 28 | === $item->getUri()) { |
29 | 29 | // URL isn't just "/" and the first part of the URL match |
@@ -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 |