@@ -27,10 +27,10 @@ discard block |
||
| 27 | 27 | $user = $em->getRepository('AppBundle:User') |
| 28 | 28 | ->find($idUser); |
| 29 | 29 | $modulesUser = $em->getRepository('AppBundle:ModuleUser') |
| 30 | - ->findBy(['user' => $user]); |
|
| 30 | + ->findBy([ 'user' => $user ]); |
|
| 31 | 31 | |
| 32 | 32 | $moduleUser = new ModuleUser(); |
| 33 | - $form = $this->createForm(ModuleUserType::class, $moduleUser, ['user' => $user]); |
|
| 33 | + $form = $this->createForm(ModuleUserType::class, $moduleUser, [ 'user' => $user ]); |
|
| 34 | 34 | |
| 35 | 35 | $form->handleRequest($request); |
| 36 | 36 | |
@@ -43,10 +43,10 @@ discard block |
||
| 43 | 43 | return $this->redirectToRoute('user_show'); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - $form_delete = []; |
|
| 46 | + $form_delete = [ ]; |
|
| 47 | 47 | |
| 48 | 48 | foreach ($modulesUser as $item) { |
| 49 | - $form_delete[$item->getModule()->getId()] = $this->createFormDelete($idUser, $item->getModule()->getId())->createView(); |
|
| 49 | + $form_delete[ $item->getModule()->getId() ] = $this->createFormDelete($idUser, $item->getModule()->getId())->createView(); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | return [ |
@@ -68,12 +68,12 @@ discard block |
||
| 68 | 68 | $module = $em->getRepository('AppBundle:Module') |
| 69 | 69 | ->find($idModule); |
| 70 | 70 | $moduleUser = $em->getRepository('AppBundle:ModuleUser') |
| 71 | - ->findOneBy(['user' => $user, 'module' => $module]); |
|
| 71 | + ->findOneBy([ 'user' => $user, 'module' => $module ]); |
|
| 72 | 72 | |
| 73 | 73 | $em->remove($moduleUser); |
| 74 | 74 | $em->flush(); |
| 75 | 75 | |
| 76 | - return $this->redirectToRoute('create_moduleUser', ['idUser' => $idUser]); |
|
| 76 | + return $this->redirectToRoute('create_moduleUser', [ 'idUser' => $idUser ]); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | private function createFormDelete($idUser, $idModule) |
| 83 | 83 | { |
| 84 | 84 | return $this->createFormBuilder() |
| 85 | - ->setAction($this->generateUrl('remove_moduleUser', ['idUser' => $idUser, 'idModule' => $idModule])) |
|
| 85 | + ->setAction($this->generateUrl('remove_moduleUser', [ 'idUser' => $idUser, 'idModule' => $idModule ])) |
|
| 86 | 86 | ->setMethod('DELETE') |
| 87 | 87 | ->add('submit', SubmitType::class, [ |
| 88 | 88 | 'label' => ' ', |
@@ -18,6 +18,6 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function indexAction() |
| 20 | 20 | { |
| 21 | - return []; |
|
| 21 | + return [ ]; |
|
| 22 | 22 | } |
| 23 | 23 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | return $this->redirectToRoute('show_category'); |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - return ['form' => $form->createView()]; |
|
| 40 | + return [ 'form' => $form->createView() ]; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | return $this->redirectToRoute('show_category'); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - return ['form' => $form->createView()]; |
|
| 63 | + return [ 'form' => $form->createView() ]; |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
@@ -90,12 +90,12 @@ discard block |
||
| 90 | 90 | $em = $this->getDoctrine()->getManager(); |
| 91 | 91 | |
| 92 | 92 | $category = $em->getRepository('AppBundle:Category') |
| 93 | - ->findBy([], ['title' => 'ASC']); |
|
| 93 | + ->findBy([ ], [ 'title' => 'ASC' ]); |
|
| 94 | 94 | |
| 95 | - $form_delete = []; |
|
| 95 | + $form_delete = [ ]; |
|
| 96 | 96 | |
| 97 | 97 | foreach ($category as $item) { |
| 98 | - $form_delete[$item->getId()] = $this->createFormDelete($item->getId())->createView(); |
|
| 98 | + $form_delete[ $item->getId() ] = $this->createFormDelete($item->getId())->createView(); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | return [ |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | private function createFormDelete($id) |
| 112 | 112 | { |
| 113 | 113 | return $this->createFormBuilder() |
| 114 | - ->setAction($this->generateUrl('remove_category', ['id' => $id])) |
|
| 114 | + ->setAction($this->generateUrl('remove_category', [ 'id' => $id ])) |
|
| 115 | 115 | ->setMethod('DELETE') |
| 116 | 116 | ->add('submit', SubmitType::class, [ |
| 117 | 117 | 'label' => ' ', |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | $moduleAjax = $em->getRepository('AppBundle:PassModule') |
| 27 | 27 | ->findAjax($module); |
| 28 | 28 | |
| 29 | - return new Response(json_encode(['moduleAjax' => $moduleAjax])); |
|
| 29 | + return new Response(json_encode([ 'moduleAjax' => $moduleAjax ])); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | $modules = $em->getRepository('AppBundle:ModuleUser') |
@@ -72,24 +72,24 @@ |
||
| 72 | 72 | */ |
| 73 | 73 | public function checkUserHash($hash, $email) |
| 74 | 74 | { |
| 75 | - $em = $this->getDoctrine()->getManager(); |
|
| 75 | + $em = $this->getDoctrine()->getManager(); |
|
| 76 | 76 | |
| 77 | - $user = $em->getRepository('AppBundle:User') |
|
| 78 | - ->findOneBy(array('email' => $email, 'hash' => $hash)); |
|
| 77 | + $user = $em->getRepository('AppBundle:User') |
|
| 78 | + ->findOneBy(array('email' => $email, 'hash' => $hash)); |
|
| 79 | 79 | |
| 80 | - if ($user) { |
|
| 80 | + if ($user) { |
|
| 81 | 81 | |
| 82 | - $user->setIsReg(true); |
|
| 83 | - $user->setHash(null); |
|
| 84 | - $this->addFlash('notice', 'You have successfully passed registration confirmation'); |
|
| 82 | + $user->setIsReg(true); |
|
| 83 | + $user->setHash(null); |
|
| 84 | + $this->addFlash('notice', 'You have successfully passed registration confirmation'); |
|
| 85 | 85 | |
| 86 | - $em->flush(); |
|
| 86 | + $em->flush(); |
|
| 87 | 87 | |
| 88 | - return $this->redirectToRoute('homepage'); |
|
| 89 | - } |
|
| 88 | + return $this->redirectToRoute('homepage'); |
|
| 89 | + } |
|
| 90 | 90 | |
| 91 | - $this->addFlash('notice', 'You haven\'t passed registration confirmation'); |
|
| 91 | + $this->addFlash('notice', 'You haven\'t passed registration confirmation'); |
|
| 92 | 92 | |
| 93 | - return $this->redirectToRoute('homepage'); |
|
| 93 | + return $this->redirectToRoute('homepage'); |
|
| 94 | 94 | } |
| 95 | 95 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | $email = trim($request->get('email')); |
| 105 | 105 | |
| 106 | 106 | $user = $em->getRepository('AppBundle:User') |
| 107 | - ->findOneBy(['email' => $email]); |
|
| 107 | + ->findOneBy([ 'email' => $email ]); |
|
| 108 | 108 | |
| 109 | 109 | if ($user && $user->getIsReg() == true) { |
| 110 | 110 | $password = $this->get('app.custom.mailer')->sendMailRecovery($email); |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | return $this->redirectToRoute('homepage'); |
| 128 | 128 | } else { |
| 129 | 129 | |
| 130 | - return []; |
|
| 130 | + return [ ]; |
|
| 131 | 131 | } |
| 132 | 132 | } |
| 133 | 133 | } |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Created by PhpStorm. |
|
| 4 | - * User: device |
|
| 5 | - * Date: 18.03.16 |
|
| 6 | - * Time: 18:02 |
|
| 7 | - */ |
|
| 3 | + * Created by PhpStorm. |
|
| 4 | + * User: device |
|
| 5 | + * Date: 18.03.16 |
|
| 6 | + * Time: 18:02 |
|
| 7 | + */ |
|
| 8 | 8 | |
| 9 | 9 | namespace AppBundle\Tests\Controller\Admin; |
| 10 | 10 | |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Created by PhpStorm. |
|
| 4 | - * User: device |
|
| 5 | - * Date: 18.03.16 |
|
| 6 | - * Time: 18:34 |
|
| 7 | - */ |
|
| 3 | + * Created by PhpStorm. |
|
| 4 | + * User: device |
|
| 5 | + * Date: 18.03.16 |
|
| 6 | + * Time: 18:34 |
|
| 7 | + */ |
|
| 8 | 8 | |
| 9 | 9 | namespace AppBundle\Tests\Controller\Admin; |
| 10 | 10 | |
@@ -7,7 +7,6 @@ |
||
| 7 | 7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
| 8 | 8 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
| 9 | 9 | use Symfony\Component\HttpFoundation\Request; |
| 10 | -use Symfony\Component\HttpFoundation\Response; |
|
| 11 | 10 | |
| 12 | 11 | class AccountController extends Controller |
| 13 | 12 | { |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Created by PhpStorm. |
|
| 4 | - * User: device |
|
| 5 | - * Date: 23.02.16 |
|
| 6 | - * Time: 10:26 |
|
| 7 | - */ |
|
| 3 | + * Created by PhpStorm. |
|
| 4 | + * User: device |
|
| 5 | + * Date: 23.02.16 |
|
| 6 | + * Time: 10:26 |
|
| 7 | + */ |
|
| 8 | 8 | |
| 9 | 9 | namespace AppBundle\Repository; |
| 10 | 10 | |