@@ -18,7 +18,7 @@ |
||
| 18 | 18 | $options['scope'] = $scopes; |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | - if($token){ |
|
| 21 | + if ($token) { |
|
| 22 | 22 | $options['token'] = $token; |
| 23 | 23 | } |
| 24 | 24 | |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | $options['scope'] = $scopes; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - if($token){ |
|
| 55 | + if ($token) { |
|
| 56 | 56 | $options['token'] = $token; |
| 57 | 57 | } |
| 58 | 58 | |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | $options['scope'] = $scopes; |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - if($token){ |
|
| 41 | + if ($token) { |
|
| 42 | 42 | $options['token'] = $token; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | $keysOpenid = array_keys($openIDServiceMap); |
| 21 | 21 | |
| 22 | 22 | $checkExists = array_intersect($keysOauth, $keysOpenid); |
| 23 | - if(!empty($checkExists)){ |
|
| 23 | + if (!empty($checkExists)) { |
|
| 24 | 24 | throw new Exception(sprintf('Multiple clients with same key is not allowed! Key'.(count($checkExists) > 1 ? 's' : '').' "%s" appear in configuration more than once!', implode(',', $checkExists))); |
| 25 | 25 | } |
| 26 | 26 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | $this->getRedis()->del($object->getClassName().':translations:'.$object->getId().':checked'); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - public function getTranslationFilter($queryBuilder, $alias, $field, $value){ |
|
| 26 | + public function getTranslationFilter($queryBuilder, $alias, $field, $value) { |
|
| 27 | 27 | if (!isset($value['value'])) { |
| 28 | 28 | return; |
| 29 | 29 | } |
@@ -204,8 +204,7 @@ |
||
| 204 | 204 | public function getTranslationClass(TranslatableAdapter $ea, $class) |
| 205 | 205 | { |
| 206 | 206 | return isset(self::$configurations[$this->name][$class]['translationClass']) ? |
| 207 | - self::$configurations[$this->name][$class]['translationClass'] : |
|
| 208 | - $ea->getDefaultTranslationClass() |
|
| 207 | + self::$configurations[$this->name][$class]['translationClass'] : $ea->getDefaultTranslationClass() |
|
| 209 | 208 | ; |
| 210 | 209 | } |
| 211 | 210 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | // 'populate' fields by *hook on form generation |
| 52 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($fieldName, $locales, $translations, $fieldType, $class, $required, $className, $id) { |
|
| 52 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($fieldName, $locales, $translations, $fieldType, $class, $required, $className, $id) { |
|
| 53 | 53 | $form = $event->getForm(); |
| 54 | 54 | foreach ($locales as $locale) { |
| 55 | 55 | $data = (array_key_exists($locale, $translations) && array_key_exists($fieldName, $translations[$locale])) ? $translations[$locale][$fieldName] : null; |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $form->add('currentFieldName', 'hidden', array('data' => $fieldName)); |
| 61 | 61 | }); |
| 62 | 62 | |
| 63 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($fieldName, $className, $id, $locales, $userLocale) { |
|
| 63 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($fieldName, $className, $id, $locales, $userLocale) { |
|
| 64 | 64 | $form = $event->getForm(); |
| 65 | 65 | $this->manager->persistTranslations($form, $className, $fieldName, $id, $locales, $userLocale); |
| 66 | 66 | }); |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | { |
| 35 | 35 | return array( |
| 36 | 36 | new Twig_SimpleFunction(self::NAME, |
| 37 | - function ($entity) { |
|
| 37 | + function($entity) { |
|
| 38 | 38 | $getter = sprintf('get%s', ucfirst($this->positionService->getPositionFieldByEntity($entity))); |
| 39 | 39 | |
| 40 | 40 | return $entity->{$getter}(); |