@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $xor = array(); |
| 51 | 51 | $properties = is_array($properties) ? $properties : array($properties); |
| 52 | 52 | |
| 53 | - foreach($properties as $field) { |
|
| 53 | + foreach ($properties as $field) { |
|
| 54 | 54 | if ($assoc = $this->addAssociation($queryBuilder, $field, false)) { |
| 55 | 55 | $fieldPath = sprintf('%s.%s', $assoc[0], $holder = $assoc[1]); |
| 56 | 56 | } else { |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | ; |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | - return array($alias, $field , $hidden); |
|
| 159 | + return array($alias, $field, $hidden); |
|
| 160 | 160 | } |
| 161 | 161 | } |
| 162 | 162 | |
@@ -22,9 +22,9 @@ |
||
| 22 | 22 | |
| 23 | 23 | $em->createQueryBuilder() |
| 24 | 24 | ->update(get_class($object), 'o') |
| 25 | - ->set('o.' . $object->getUniqueStateField(), ':update') |
|
| 26 | - ->where('o.' . $object->getUniqueStateField() . ' = :where') |
|
| 27 | - ->andWhere('o.' . $id . ' <> :self') |
|
| 25 | + ->set('o.'.$object->getUniqueStateField(), ':update') |
|
| 26 | + ->where('o.'.$object->getUniqueStateField().' = :where') |
|
| 27 | + ->andWhere('o.'.$id.' <> :self') |
|
| 28 | 28 | ->setParameter('update', false) |
| 29 | 29 | ->setParameter('where', true) |
| 30 | 30 | ->setParameter('self', $object) |
@@ -15,20 +15,20 @@ |
||
| 15 | 15 | |
| 16 | 16 | $this->register( |
| 17 | 17 | 'getCurrentUser', |
| 18 | - function ($arg) { |
|
| 18 | + function($arg) { |
|
| 19 | 19 | return sprintf('$this->get("security.token_storage")->getToken()->getUser()', $arg); |
| 20 | 20 | }, |
| 21 | - function (array $variables) { |
|
| 21 | + function(array $variables) { |
|
| 22 | 22 | return $variables['container']->get('security.token_storage')->getToken()->getUser(); |
| 23 | 23 | } |
| 24 | 24 | ); |
| 25 | 25 | |
| 26 | 26 | $this->register( |
| 27 | 27 | 'getQueryParam', |
| 28 | - function ($limitKey, $default) { |
|
| 28 | + function($limitKey, $default) { |
|
| 29 | 29 | return sprintf('$this->get("request")->get(%s, %s)', $limitKey, $default); |
| 30 | 30 | }, |
| 31 | - function (array $variables, $limitKey, $default) { |
|
| 31 | + function(array $variables, $limitKey, $default) { |
|
| 32 | 32 | return $variables['container']->get('request')->get($limitKey, $default); |
| 33 | 33 | } |
| 34 | 34 | ); |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | $pattern = $this->router->getRouteCollection()->get($routeName)->getPath(); |
| 54 | 54 | |
| 55 | 55 | if (preg_match_all('/\{([a-z]+)\}/', $pattern, $matches)) { |
| 56 | - foreach($matches[1] as $holder) { |
|
| 56 | + foreach ($matches[1] as $holder) { |
|
| 57 | 57 | $value = $accessor->getValue($object, $holder); |
| 58 | 58 | |
| 59 | 59 | if (!is_numeric($value)) { |