@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Created by PhpStorm. |
|
4 | - * User: device |
|
5 | - * Date: 19.02.16 |
|
6 | - * Time: 17:37 |
|
7 | - */ |
|
3 | + * Created by PhpStorm. |
|
4 | + * User: device |
|
5 | + * Date: 19.02.16 |
|
6 | + * Time: 17:37 |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace AppBundle\OAuthProvider; |
10 | 10 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $users = $em->getRepository('AppBundle:User') |
27 | 27 | ->findChoiceModules($module); |
28 | 28 | |
29 | - return new Response(json_encode(['users' => $users])); |
|
29 | + return new Response(json_encode([ 'users' => $users ])); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | if ($choice = $request->get('users_choice')) { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $moduleUser = new ModuleUser(); |
39 | 39 | $moduleUser->setModule($moduleHidden); |
40 | 40 | $user = $em->getRepository('AppBundle:User') |
41 | - ->find($choice[$i]); |
|
41 | + ->find($choice[ $i ]); |
|
42 | 42 | $moduleUser->setUser($user); |
43 | 43 | $user->removeChosenModule($hiddenModule); |
44 | 44 | $em->persist($moduleUser); |
@@ -43,8 +43,9 @@ |
||
43 | 43 | public function afterSocLogin() |
44 | 44 | { |
45 | 45 | $user = $this->getUser(); |
46 | - if (!$user->getPassword()) |
|
47 | - return $this->redirectToRoute('update_profile'); |
|
46 | + if (!$user->getPassword()) { |
|
47 | + return $this->redirectToRoute('update_profile'); |
|
48 | + } |
|
48 | 49 | |
49 | 50 | return $this->redirectToRoute('account'); |
50 | 51 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | { |
25 | 25 | return $this->createQueryBuilder('u') |
26 | 26 | ->where('u.chosenModule LIKE :module') |
27 | - ->setParameter('module', '%"'.$module.'"%') |
|
27 | + ->setParameter('module', '%"' . $module . '"%') |
|
28 | 28 | ->getQuery() |
29 | 29 | ->getResult(); |
30 | 30 | } |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $this->isLocked = false; |
128 | 128 | $this->modulesUser = new ArrayCollection(); |
129 | 129 | $this->role = self::ROLE_USER; |
130 | - $this->chosenModule = []; |
|
130 | + $this->chosenModule = [ ]; |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | /** |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | */ |
268 | 268 | public function getRoles() |
269 | 269 | { |
270 | - return [$this->role]; |
|
270 | + return [ $this->role ]; |
|
271 | 271 | |
272 | 272 | } |
273 | 273 | |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | */ |
322 | 322 | public function isAccountNonLocked() |
323 | 323 | { |
324 | - return $this->isLocked ? false : true ; |
|
324 | + return $this->isLocked ? false : true; |
|
325 | 325 | } |
326 | 326 | |
327 | 327 | /** |
@@ -491,8 +491,8 @@ discard block |
||
491 | 491 | |
492 | 492 | public function removeChosenModule($chosenModule) |
493 | 493 | { |
494 | - if(($key = array_search($chosenModule, $this->chosenModule)) !== false) { |
|
495 | - unset($this->chosenModule[$key]); |
|
494 | + if (($key = array_search($chosenModule, $this->chosenModule)) !== false) { |
|
495 | + unset($this->chosenModule[ $key ]); |
|
496 | 496 | } |
497 | 497 | |
498 | 498 | return $this; |
@@ -38,8 +38,8 @@ |
||
38 | 38 | 'class' => 'form-control', |
39 | 39 | ] |
40 | 40 | ], |
41 | - 'first_options' => ['label' => 'Password'], |
|
42 | - 'second_options' => ['label' => 'Repeat Password'], |
|
41 | + 'first_options' => [ 'label' => 'Password' ], |
|
42 | + 'second_options' => [ 'label' => 'Repeat Password' ], |
|
43 | 43 | ] |
44 | 44 | ); |
45 | 45 | } |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Created by PhpStorm. |
|
4 | - * User: device |
|
5 | - * Date: 23.03.16 |
|
6 | - * Time: 18:35 |
|
7 | - */ |
|
3 | + * Created by PhpStorm. |
|
4 | + * User: device |
|
5 | + * Date: 23.03.16 |
|
6 | + * Time: 18:35 |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace AppBundle\Controller; |
10 | 10 |