@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Created by PhpStorm. |
|
| 4 | - * User: device |
|
| 5 | - * Date: 23.02.16 |
|
| 6 | - * Time: 9:27 |
|
| 7 | - */ |
|
| 3 | + * Created by PhpStorm. |
|
| 4 | + * User: device |
|
| 5 | + * Date: 23.02.16 |
|
| 6 | + * Time: 9:27 |
|
| 7 | + */ |
|
| 8 | 8 | |
| 9 | 9 | namespace AppBundle\Repository; |
| 10 | 10 | |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Created by PhpStorm. |
|
| 4 | - * User: device |
|
| 5 | - * Date: 23.02.16 |
|
| 6 | - * Time: 10:00 |
|
| 7 | - */ |
|
| 3 | + * Created by PhpStorm. |
|
| 4 | + * User: device |
|
| 5 | + * Date: 23.02.16 |
|
| 6 | + * Time: 10:00 |
|
| 7 | + */ |
|
| 8 | 8 | |
| 9 | 9 | namespace AppBundle\Entity; |
| 10 | 10 | |
@@ -233,7 +233,7 @@ |
||
| 233 | 233 | */ |
| 234 | 234 | public function getRoles() |
| 235 | 235 | { |
| 236 | - return [$this->role]; |
|
| 236 | + return [ $this->role ]; |
|
| 237 | 237 | |
| 238 | 238 | } |
| 239 | 239 | |
@@ -41,10 +41,10 @@ |
||
| 41 | 41 | $role = User::ROLE_ADMIN; |
| 42 | 42 | |
| 43 | 43 | $em = $this->doctrine->getManager(); |
| 44 | - $user = $em->getRepository('AppBundle:User')->findBy(['email' => $email]); |
|
| 44 | + $user = $em->getRepository('AppBundle:User')->findBy([ 'email' => $email ]); |
|
| 45 | 45 | if (!$user) |
| 46 | 46 | $user = new User(); |
| 47 | - else $user = $user[0]; |
|
| 47 | + else $user = $user[ 0 ]; |
|
| 48 | 48 | |
| 49 | 49 | $pass = $this->userPasswordEncoder->encodePassword($user, $password); |
| 50 | 50 | $user->setEmail($email); |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Created by PhpStorm. |
|
| 4 | - * User: device |
|
| 5 | - * Date: 29.01.16 |
|
| 6 | - * Time: 17:07 |
|
| 7 | - */ |
|
| 3 | + * Created by PhpStorm. |
|
| 4 | + * User: device |
|
| 5 | + * Date: 29.01.16 |
|
| 6 | + * Time: 17:07 |
|
| 7 | + */ |
|
| 8 | 8 | |
| 9 | 9 | namespace AppBundle\Services; |
| 10 | 10 | |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Created by PhpStorm. |
|
| 4 | - * User: device |
|
| 5 | - * Date: 23.02.16 |
|
| 6 | - * Time: 13:03 |
|
| 7 | - */ |
|
| 3 | + * Created by PhpStorm. |
|
| 4 | + * User: device |
|
| 5 | + * Date: 23.02.16 |
|
| 6 | + * Time: 13:03 |
|
| 7 | + */ |
|
| 8 | 8 | |
| 9 | 9 | namespace AppBundle\Services; |
| 10 | 10 | |
@@ -94,6 +94,6 @@ |
||
| 94 | 94 | return new RedirectResponse($this->router->generate('homepage')); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - return ['form' => $form->createView()]; |
|
| 97 | + return [ 'form' => $form->createView() ]; |
|
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | 100 | \ No newline at end of file |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | public function buildForm(FormBuilderInterface $builder, array $options) |
| 13 | 13 | { |
| 14 | 14 | $builder |
| 15 | - ->add('textAnswer', TextType::class,[ |
|
| 15 | + ->add('textAnswer', TextType::class, [ |
|
| 16 | 16 | 'attr' => [ |
| 17 | 17 | 'class' => 'form-control', |
| 18 | 18 | 'placeholder' => 'enter answer' |
@@ -37,13 +37,13 @@ |
||
| 37 | 37 | ]) |
| 38 | 38 | ->add('course', EntityType::class, [ |
| 39 | 39 | 'class' => 'AppBundle\Entity\Category', |
| 40 | - 'query_builder' => function (EntityRepository $er) { |
|
| 40 | + 'query_builder' => function(EntityRepository $er) { |
|
| 41 | 41 | return $er->createQueryBuilder('c') |
| 42 | 42 | ->orderBy('c.title', 'ASC'); |
| 43 | 43 | }, |
| 44 | 44 | 'label' => 'Course', |
| 45 | 45 | 'property' => 'title', |
| 46 | - 'attr' => ['class' => 'form-control'], |
|
| 46 | + 'attr' => [ 'class' => 'form-control' ], |
|
| 47 | 47 | 'required' => true |
| 48 | 48 | ]) |
| 49 | 49 | ->add('plain_password', RepeatedType::class, [ |
@@ -21,25 +21,25 @@ discard block |
||
| 21 | 21 | 'placeholder' => 'enter title' |
| 22 | 22 | ] |
| 23 | 23 | ]) |
| 24 | - ->add('rating', TextType::class,[ |
|
| 24 | + ->add('rating', TextType::class, [ |
|
| 25 | 25 | 'attr' => [ |
| 26 | 26 | 'class' => 'form-control', |
| 27 | 27 | 'placeholder' => 'enter rating' |
| 28 | 28 | ] |
| 29 | 29 | ]) |
| 30 | - ->add('persentSuccess', TextType::class,[ |
|
| 30 | + ->add('persentSuccess', TextType::class, [ |
|
| 31 | 31 | 'attr' => [ |
| 32 | 32 | 'class' => 'form-control', |
| 33 | 33 | 'placeholder' => 'enter persent' |
| 34 | 34 | ] |
| 35 | 35 | ]) |
| 36 | - ->add('time', TextType::class,[ |
|
| 36 | + ->add('time', TextType::class, [ |
|
| 37 | 37 | 'attr' => [ |
| 38 | 38 | 'class' => 'form-control', |
| 39 | 39 | 'placeholder' => 'enter time' |
| 40 | 40 | ] |
| 41 | 41 | ]) |
| 42 | - ->add('attempts', TextType::class,[ |
|
| 42 | + ->add('attempts', TextType::class, [ |
|
| 43 | 43 | 'attr' => [ |
| 44 | 44 | 'class' => 'form-control', |
| 45 | 45 | 'placeholder' => 'enter attempts' |
@@ -47,13 +47,13 @@ discard block |
||
| 47 | 47 | ]) |
| 48 | 48 | ->add('category', EntityType::class, [ |
| 49 | 49 | 'class' => 'AppBundle\Entity\Category', |
| 50 | - 'query_builder' => function (EntityRepository $er) { |
|
| 50 | + 'query_builder' => function(EntityRepository $er) { |
|
| 51 | 51 | return $er->createQueryBuilder('c') |
| 52 | 52 | ->orderBy('c.title', 'ASC'); |
| 53 | 53 | }, |
| 54 | 54 | 'label' => 'Category', |
| 55 | 55 | 'property' => 'title', |
| 56 | - 'attr' => ['class' => 'form-control'], |
|
| 56 | + 'attr' => [ 'class' => 'form-control' ], |
|
| 57 | 57 | 'required' => true |
| 58 | 58 | ]) |
| 59 | 59 | ->add('module_image', FileType::class, [ |