@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | /** |
| 248 | - * @return mixed |
|
| 248 | + * @return null|Category |
|
| 249 | 249 | */ |
| 250 | 250 | public function getCategory() |
| 251 | 251 | { |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | /** |
| 256 | - * @param mixed $category |
|
| 256 | + * @param null|Category $category |
|
| 257 | 257 | */ |
| 258 | 258 | public function setCategory(Category $category = null) |
| 259 | 259 | { |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | /** |
| 264 | - * @return mixed |
|
| 264 | + * @return ArrayCollection |
|
| 265 | 265 | */ |
| 266 | 266 | public function getQuestions() |
| 267 | 267 | { |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | /** |
| 291 | - * @return mixed |
|
| 291 | + * @return ArrayCollection |
|
| 292 | 292 | */ |
| 293 | 293 | public function getModulesUser() |
| 294 | 294 | { |
@@ -22,7 +22,6 @@ discard block |
||
| 22 | 22 | protected $service; |
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | - * @param ImageManagerServices $container |
|
| 26 | 25 | */ |
| 27 | 26 | public function __construct(ImageManagerServices $service) |
| 28 | 27 | { |
@@ -30,7 +29,7 @@ discard block |
||
| 30 | 29 | } |
| 31 | 30 | |
| 32 | 31 | /** |
| 33 | - * @return array |
|
| 32 | + * @return string[] |
|
| 34 | 33 | */ |
| 35 | 34 | public function getSubscribedEvents() |
| 36 | 35 | { |
@@ -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); |
@@ -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, [ |
@@ -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 | } |