Test Failed
Push — develop ( 4c8119...e64b8e )
by Stone
04:27
created
src/Exception/RedirectException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         return $this->redirectResponse;
31 31
     }
32 32
 
33
-    public function getRedirectMessage(){
33
+    public function getRedirectMessage() {
34 34
         return $this->redirectMessage;
35 35
     }
36 36
 
Please login to merge, or discard this patch.
src/Form/TrickType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,16 +16,16 @@
 block discarded – undo
16 16
     public function buildForm(FormBuilderInterface $builder, array $options)
17 17
     {
18 18
         $builder
19
-            ->add('name', TextType::class,[
19
+            ->add('name', TextType::class, [
20 20
                 'label' => 'Name of the trick, must be at least 5 characters'
21 21
             ])
22
-            ->add('text', TextareaType::class ,[
22
+            ->add('text', TextareaType::class, [
23 23
                 'label' => 'Describe the trick',
24 24
                 'attr' => [
25 25
                     'class'=>'materialize-textarea'
26 26
                 ]
27 27
             ])
28
-            ->add('category', EntityType::class,[
28
+            ->add('category', EntityType::class, [
29 29
                 'class' => Category::class,
30 30
                 'choice_label' => 'Name',
31 31
             ])
Please login to merge, or discard this patch.
src/DataFixtures/TrickFixtures.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,19 +15,19 @@
 block discarded – undo
15 15
         $faker = Factory::create();
16 16
 
17 17
         $categoryList = array();
18
-        for($i=0; $i<5; $i++){
18
+        for ($i = 0; $i < 5; $i++) {
19 19
             $category = new Category();
20 20
             $categoryList[] = $category->setName($faker->word);
21 21
             $manager->persist($category);
22 22
         }
23 23
 
24
-        for ($i=0; $i<25; $i++){
24
+        for ($i = 0; $i < 25; $i++) {
25 25
             $trick = new Trick();
26 26
             $trick
27 27
                 ->setName($faker->words(3, true))
28 28
                 ->setText($faker->paragraph())
29 29
                 ->setCreatedAt($faker->dateTimeThisDecade())
30
-                ->setCategory($categoryList[rand(0,4)]);
30
+                ->setCategory($categoryList[rand(0, 4)]);
31 31
             ;
32 32
 
33 33
             $manager->persist($trick);
Please login to merge, or discard this patch.
src/Repository/TrickRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 
50 50
         foreach ($searchTerms as $key => $term) {
51 51
             $queryBuilder
52
-                ->orWhere('p.name LIKE :term_' . $key)
53
-                ->setParameter('term_' . $key, '%' . $term . '%');
52
+                ->orWhere('p.name LIKE :term_'.$key)
53
+                ->setParameter('term_'.$key, '%'.$term.'%');
54 54
 
55 55
         }
56 56
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     private function extractSearchTerms(string $searchQuery): array
78 78
     {
79 79
         $terms = array_unique(explode(' ', $searchQuery));
80
-        return array_filter($terms, function ($term) {
80
+        return array_filter($terms, function($term) {
81 81
             return 2 <= mb_strlen($term);
82 82
         });
83 83
     }
Please login to merge, or discard this patch.
src/Controller/Trick/Admin/DeleteTrickController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     {
41 41
 
42 42
         $submittedToken = $request->request->get('_token');
43
-        if (!$this->isCsrfTokenValid('delete-trick' . $trick->getId(), $submittedToken)) {
43
+        if (!$this->isCsrfTokenValid('delete-trick'.$trick->getId(), $submittedToken)) {
44 44
             throw new RedirectException($this->generateUrl('home'), 'Bad CSRF Token');
45 45
         }
46 46
 
Please login to merge, or discard this patch.
src/Controller/Trick/Admin/EditTrickController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 
85 85
         $history = array();
86 86
         //Only load the history if we are admin. Ease the load.
87
-        if($this->isGranted('ROLE_ADMIN')){
87
+        if ($this->isGranted('ROLE_ADMIN')) {
88 88
             $history = $this->trickHistory->getHistory($trick->getId());
89 89
         }
90 90
 
Please login to merge, or discard this patch.
src/Entity/User.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     public function getUsername(): string
111 111
     {
112
-        return (string)$this->userName;
112
+        return (string) $this->userName;
113 113
     }
114 114
 
115 115
     /**
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      */
137 137
     public function getPassword(): string
138 138
     {
139
-        return (string)$this->password;
139
+        return (string) $this->password;
140 140
     }
141 141
 
142 142
     public function setPassword(string $password): self
@@ -328,6 +328,6 @@  discard block
 block discarded – undo
328 328
             $this->verified,
329 329
             $this->verifiedDateTime,
330 330
             $this->updatedAt,
331
-            )=unserialize($serialized, ['allowed_classes' => false]);
331
+            ) = unserialize($serialized, ['allowed_classes' => false]);
332 332
     }
333 333
 }
Please login to merge, or discard this patch.
src/Entity/Category.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         return $this;
82 82
     }
83 83
 
84
-    public function __toString(){
84
+    public function __toString() {
85 85
         return $this->Name;
86 86
     }
87 87
 }
Please login to merge, or discard this patch.
src/Form/UserProfileFormType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@
 block discarded – undo
9 9
 use Symfony\Component\OptionsResolver\OptionsResolver;
10 10
 use Vich\UploaderBundle\Form\Type\VichImageType;
11 11
 
12
-class UserProfileFormType extends AbstractType{
12
+class UserProfileFormType extends AbstractType {
13 13
 
14 14
     public function buildForm(FormBuilderInterface $builder, array $options)
15 15
     {
16 16
         $builder
17 17
             ->add('UserName', TextType::class)
18
-            ->add('imageFile', VichImageType::class,[
18
+            ->add('imageFile', VichImageType::class, [
19 19
                 'required' => false,
20 20
                 'allow_delete' => false,
21 21
                 'download_uri' => false,
Please login to merge, or discard this patch.