@@ -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, [ |
@@ -41,7 +41,7 @@ |
||
41 | 41 | $lastName = $input->getArgument('lastName'); |
42 | 42 | |
43 | 43 | $this->getContainer()->get('app.admin.creator') |
44 | - ->create($email, $password, $firstName, $lastName); |
|
44 | + ->create($email, $password, $firstName, $lastName); |
|
45 | 45 | |
46 | 46 | $output->writeln(sprintf('User <comment>%s</comment> was created/updated', $firstName.' '.$lastName)); |
47 | 47 | } |
@@ -43,6 +43,6 @@ |
||
43 | 43 | $this->getContainer()->get('app.admin.creator') |
44 | 44 | ->create($email, $password, $firstName, $lastName); |
45 | 45 | |
46 | - $output->writeln(sprintf('User <comment>%s</comment> was created/updated', $firstName.' '.$lastName)); |
|
46 | + $output->writeln(sprintf('User <comment>%s</comment> was created/updated', $firstName . ' ' . $lastName)); |
|
47 | 47 | } |
48 | 48 | } |
@@ -15,6 +15,6 @@ |
||
15 | 15 | */ |
16 | 16 | public function adminAction() |
17 | 17 | { |
18 | - return []; |
|
18 | + return [ ]; |
|
19 | 19 | } |
20 | 20 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | return $this->redirectToRoute('create_question', array('module' => $module)); |
33 | 33 | } |
34 | 34 | |
35 | - return ['form' => $form->createView()]; |
|
35 | + return [ 'form' => $form->createView() ]; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | return $this->redirectToRoute('show_module'); |
56 | 56 | } |
57 | 57 | |
58 | - return ['form' => $form->createView()]; |
|
58 | + return [ 'form' => $form->createView() ]; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -84,14 +84,14 @@ discard block |
||
84 | 84 | $em = $this->getDoctrine()->getManager(); |
85 | 85 | |
86 | 86 | $module = $em->getRepository('AppBundle:Module') |
87 | - ->findBy([],['createdAt' => 'DESC']); |
|
87 | + ->findBy([ ], [ 'createdAt' => 'DESC' ]); |
|
88 | 88 | |
89 | - $form_edit = []; |
|
90 | - $form_delete = []; |
|
89 | + $form_edit = [ ]; |
|
90 | + $form_delete = [ ]; |
|
91 | 91 | |
92 | 92 | foreach ($module as $item) { |
93 | - $form_edit[$item->getId()] = $this->createFormEdit($item->getId())->createView(); |
|
94 | - $form_delete[$item->getId()] = $this->createFormDelete($item->getId())->createView(); |
|
93 | + $form_edit[ $item->getId() ] = $this->createFormEdit($item->getId())->createView(); |
|
94 | + $form_delete[ $item->getId() ] = $this->createFormDelete($item->getId())->createView(); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | return [ |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | private function createFormEdit($id) |
109 | 109 | { |
110 | 110 | return $this->createFormBuilder() |
111 | - ->setAction($this->generateUrl('edit_module', ['id' => $id])) |
|
111 | + ->setAction($this->generateUrl('edit_module', [ 'id' => $id ])) |
|
112 | 112 | ->setMethod('PUT') |
113 | 113 | ->add('submit', SubmitType::class, [ |
114 | 114 | 'label' => ' ', |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | private function createFormDelete($id) |
126 | 126 | { |
127 | 127 | return $this->createFormBuilder() |
128 | - ->setAction($this->generateUrl('remove_module', ['id' => $id])) |
|
128 | + ->setAction($this->generateUrl('remove_module', [ 'id' => $id ])) |
|
129 | 129 | ->setMethod('DELETE') |
130 | 130 | ->add('submit', SubmitType::class, [ |
131 | 131 | 'label' => ' ', |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | return $this->redirectToRoute('show_category'); |
37 | 37 | } |
38 | 38 | |
39 | - return ['form' => $form->createView()]; |
|
39 | + return [ 'form' => $form->createView() ]; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | return $this->redirectToRoute('show_category'); |
60 | 60 | } |
61 | 61 | |
62 | - return ['form' => $form->createView()]; |
|
62 | + return [ 'form' => $form->createView() ]; |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
@@ -88,14 +88,14 @@ discard block |
||
88 | 88 | $em = $this->getDoctrine()->getManager(); |
89 | 89 | |
90 | 90 | $category = $em->getRepository('AppBundle:Category') |
91 | - ->findBy([], ['title' => 'ASC']); |
|
91 | + ->findBy([ ], [ 'title' => 'ASC' ]); |
|
92 | 92 | |
93 | - $form_edit = []; |
|
94 | - $form_delete = []; |
|
93 | + $form_edit = [ ]; |
|
94 | + $form_delete = [ ]; |
|
95 | 95 | |
96 | 96 | foreach ($category as $item) { |
97 | - $form_edit[$item->getId()] = $this->createFormEdit($item->getId())->createView(); |
|
98 | - $form_delete[$item->getId()] = $this->createFormDelete($item->getId())->createView(); |
|
97 | + $form_edit[ $item->getId() ] = $this->createFormEdit($item->getId())->createView(); |
|
98 | + $form_delete[ $item->getId() ] = $this->createFormDelete($item->getId())->createView(); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | return [ |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | private function createFormEdit($id) |
113 | 113 | { |
114 | 114 | return $this->createFormBuilder() |
115 | - ->setAction($this->generateUrl('edit_category', ['id' => $id])) |
|
115 | + ->setAction($this->generateUrl('edit_category', [ 'id' => $id ])) |
|
116 | 116 | ->setMethod('PUT') |
117 | 117 | ->add('submit', SubmitType::class, [ |
118 | 118 | 'label' => ' ', |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | private function createFormDelete($id) |
130 | 130 | { |
131 | 131 | return $this->createFormBuilder() |
132 | - ->setAction($this->generateUrl('remove_category', ['id' => $id])) |
|
132 | + ->setAction($this->generateUrl('remove_category', [ 'id' => $id ])) |
|
133 | 133 | ->setMethod('DELETE') |
134 | 134 | ->add('submit', SubmitType::class, [ |
135 | 135 | 'label' => ' ', |
@@ -18,6 +18,6 @@ |
||
18 | 18 | */ |
19 | 19 | public function adminAction() |
20 | 20 | { |
21 | - return []; |
|
21 | + return [ ]; |
|
22 | 22 | } |
23 | 23 | } |
@@ -18,6 +18,6 @@ |
||
18 | 18 | */ |
19 | 19 | public function indexAction() |
20 | 20 | { |
21 | - return []; |
|
21 | + return [ ]; |
|
22 | 22 | } |
23 | 23 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | return $this->redirectToRoute('show_module'); |
40 | 40 | } |
41 | 41 | |
42 | - return ['form' => $form->createView()]; |
|
42 | + return [ 'form' => $form->createView() ]; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | } |