Test Failed
Pull Request — master (#15)
by
unknown
10:35
created
src/VersionControl/GitControlBundle/Controller/ProjectBranchController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         $form->add('remotename', HiddenType::class, array(
133 133
             'label' => 'Remote Branch Name', 'required' => true, 'constraints' => array(
134 134
                 new NotBlank(),
135
-            ), )
135
+            ),)
136 136
         );
137 137
 
138 138
         return array_merge($this->viewVariables, array(
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         $form->add('remotename', HiddenType::class, array(
160 160
             'label' => 'Remote Branch Name', 'required' => true, 'constraints' => array(
161 161
                 new NotBlank(),
162
-            ), )
162
+            ),)
163 163
         );
164 164
 
165 165
         $form->handleRequest($request);
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
                 ->add('name', TextType::class, array(
247 247
                     'label' => 'Branch Name', 'required' => true, 'constraints' => array(
248 248
                         new NotBlank(),
249
-                    ), )
249
+                    ),)
250 250
                 )
251 251
                 ->add('switch', CheckboxType::class, array(
252 252
                     'label' => 'Switch to branch on creation', 'required' => false,
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
     {
272 272
         try {
273 273
             $user = $this->get('security.token_storage')->getToken()->getUser();
274
-            $author = $user->getName().' <'.$user->getEmail().'>';
274
+            $author = $user->getName() . ' <' . $user->getEmail() . '>';
275 275
             $response = $this->gitCommands->command('branch')->mergeBranch($branchName);
276 276
             $this->get('session')->getFlashBag()->add('notice', $response);
277 277
         } catch (\Exception $e) {
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
                 ->add('branch', ChoiceType::class, array(
313 313
                     'choices' => $branches, 'label' => 'Branch Name', 'required' => true, 'choices_as_values' => true, 'constraints' => array(
314 314
                         new NotBlank(),
315
-                    ), )
315
+                    ),)
316 316
                 )
317 317
                 ->getForm();
318 318
 
Please login to merge, or discard this patch.
src/VersionControl/GitControlBundle/Controller/ProjectFilesController.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
                     break;
55 55
                 }else{
56 56
                     //Get last md file
57
-                     $readme = $this->gitFilesCommands->readFile($file);
57
+                        $readme = $this->gitFilesCommands->readFile($file);
58 58
                 }
59 59
             }
60 60
         }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
         $readme = '';
50 50
         foreach ($files as $file) {
51 51
             if (strtolower($file->getExtension()) == 'md' || strtolower($file->getExtension()) == 'markdown') {
52
-                if(strtolower($file->getFilename()) === 'readme' ){
52
+                if (strtolower($file->getFilename()) === 'readme') {
53 53
                     $readme = $this->gitFilesCommands->readFile($file);
54 54
                     break;
55
-                }else{
55
+                } else {
56 56
                     //Get last md file
57 57
                      $readme = $this->gitFilesCommands->readFile($file);
58 58
                 }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 
136 136
         if (trim($pathInfo['dirname']) && $pathInfo['dirname'] != '.') {
137 137
             $currentDir = $pathInfo['dirname'];
138
-            $params['currentDir'] = $currentDir.'/';
138
+            $params['currentDir'] = $currentDir . '/';
139 139
         }
140 140
 
141 141
         try {
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
                 if(strtolower($file->getFilename()) === 'readme' ){
53 53
                     $readme = $this->gitFilesCommands->readFile($file);
54 54
                     break;
55
-                }else{
55
+                } else{
56 56
                     //Get last md file
57 57
                      $readme = $this->gitFilesCommands->readFile($file);
58 58
                 }
Please login to merge, or discard this patch.
VersionControl/GitControlBundle/Controller/Issues/IssueLabelController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         if ($form->isValid()) {
70 70
             $issueLabel = $this->issueLabelRepository->createLabel($issueLabel);
71 71
 
72
-            $this->get('session')->getFlashBag()->add('notice', 'New Issue label Created '.$issueLabel->getId().'.');
72
+            $this->get('session')->getFlashBag()->add('notice', 'New Issue label Created ' . $issueLabel->getId() . '.');
73 73
 
74 74
             $this->get('session')->getFlashBag()->add('info', 'It may take a minute or two before you can see the new label in the list below');
75 75
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         if ($editForm->isValid()) {
187 187
             $this->issueLabelRepository->updateLabel($issueLabel);
188 188
 
189
-            $this->get('session')->getFlashBag()->add('notice', "Issue label Update '".$issueLabel->getId()."'.");
189
+            $this->get('session')->getFlashBag()->add('notice', "Issue label Update '" . $issueLabel->getId() . "'.");
190 190
             //$this->get('session')->getFlashBag()->add('info', "It may take a minute or two before you can see the updated label in the list below");
191 191
 
192 192
             return $this->redirect($this->generateUrl('issuelabels', array('id' => $this->project->getId())));
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
             $this->issueLabelRepository->deleteLabel($labelId);
210 210
         }
211 211
 
212
-        $this->get('session')->getFlashBag()->add('notice', "Issue label '".$labelId."' has been deleted");
212
+        $this->get('session')->getFlashBag()->add('notice', "Issue label '" . $labelId . "' has been deleted");
213 213
 
214 214
         return $this->redirect($this->generateUrl('issuelabels', array('id' => $this->project->getId())));
215 215
     }
Please login to merge, or discard this patch.
src/VersionControl/GitControlBundle/Controller/Issues/IssueController.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -407,8 +407,8 @@
 block discarded – undo
407 407
                 $this->issueRepository->closeIssue($issueId);
408 408
             }
409 409
 
410
-           // $em->persist($entity);
411
-           // $em->flush();
410
+            // $em->persist($entity);
411
+            // $em->flush();
412 412
 
413 413
             return $this->redirect($this->generateUrl('issue_show', array('id' => $this->project->getId(), 'issueId' => $issueId)));
414 414
         }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         if ($form->isValid()) {
122 122
             $issueEntity = $this->issueRepository->createIssue($issueEntity);
123
-            $this->get('session')->getFlashBag()->add('notice', 'Issue #'.$issueEntity->getId().' successfully updated');
123
+            $this->get('session')->getFlashBag()->add('notice', 'Issue #' . $issueEntity->getId() . ' successfully updated');
124 124
 
125 125
             return $this->redirect($this->generateUrl('issues', array('id' => $this->project->getId())));
126 126
         }
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
         if ($editForm->isValid()) {
265 265
             $this->issueRepository->updateIssue($issueEntity);
266 266
 
267
-            $this->get('session')->getFlashBag()->add('notice', 'Issue #'.$issueEntity->getId().' successfully updated');
267
+            $this->get('session')->getFlashBag()->add('notice', 'Issue #' . $issueEntity->getId() . ' successfully updated');
268 268
 
269 269
             return $this->redirect($this->generateUrl('issue_edit', array('id' => $this->project->getId(), 'issueId' => $issueId)));
270 270
         }
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
             throw $this->createNotFoundException('Unable to find Issue entity.');
314 314
         }
315 315
 
316
-        $this->get('session')->getFlashBag()->add('notice', 'Issue #'.$issueEntity->getId().' has been closed');
316
+        $this->get('session')->getFlashBag()->add('notice', 'Issue #' . $issueEntity->getId() . ' has been closed');
317 317
 
318 318
         return $this->redirect($this->generateUrl('issues', array('id' => $this->project->getId())));
319 319
     }
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
             throw $this->createNotFoundException('Unable to find Issue entity.');
334 334
         }
335 335
 
336
-        $this->get('session')->getFlashBag()->add('notice', 'Issue #'.$issueEntity->getId().' has been re-opened');
336
+        $this->get('session')->getFlashBag()->add('notice', 'Issue #' . $issueEntity->getId() . ' has been re-opened');
337 337
 
338 338
         return $this->redirect($this->generateUrl('issue_show', array('id' => $this->project->getId(), 'issueId' => $issueEntity->getId())));
339 339
     }
Please login to merge, or discard this patch.
GitControlBundle/Controller/Issues/IssueMilestoneController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         if ($form->isValid()) {
84 84
             $issueMilestone = $this->issueMilestoneRepository->createMilestone($issueMilestone);
85 85
 
86
-            $this->get('session')->getFlashBag()->add('notice', 'New Milestone:'.$issueMilestone->getTitle());
86
+            $this->get('session')->getFlashBag()->add('notice', 'New Milestone:' . $issueMilestone->getTitle());
87 87
 
88 88
             return $this->redirect($this->generateUrl('issuemilestone_show', array('milestoneId' => $issueMilestone->getId())));
89 89
         }
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 
232 232
         if ($editForm->isValid()) {
233 233
             $this->issueMilestoneRepository->updateMilestone($issueMilestone);
234
-            $this->get('session')->getFlashBag()->add('notice', 'Updated Milestone:'.$issueMilestone->getTitle());
234
+            $this->get('session')->getFlashBag()->add('notice', 'Updated Milestone:' . $issueMilestone->getTitle());
235 235
 
236 236
             return $this->redirect($this->generateUrl('issuemilestone_show', array('id' => $id, 'milestoneId' => $milestoneId)));
237 237
         }
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
         if ($form->isValid()) {
258 258
             $this->issueMilestoneRepository->deleteMilestone($milestoneId);
259 259
 
260
-            $this->get('session')->getFlashBag()->add('notice', 'Deleted Milestone:'.$milestoneId);
260
+            $this->get('session')->getFlashBag()->add('notice', 'Deleted Milestone:' . $milestoneId);
261 261
         }
262 262
 
263 263
         return $this->redirect($this->generateUrl('issuemilestones', array('id' => $id)));
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
             throw $this->createNotFoundException('Unable to find Issue Milestone entity.');
296 296
         }
297 297
 
298
-        $this->get('session')->getFlashBag()->add('notice', 'Milestone #'.$issueMilestone->getId().' has been closed');
298
+        $this->get('session')->getFlashBag()->add('notice', 'Milestone #' . $issueMilestone->getId() . ' has been closed');
299 299
 
300 300
         return $this->redirect($this->generateUrl('issuemilestones', array('project' => $issueMilestone->getProject()->getId())));
301 301
     }
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
             throw $this->createNotFoundException('Unable to find Issue Milestone entity.');
316 316
         }
317 317
 
318
-        $this->get('session')->getFlashBag()->add('notice', 'Milestone #'.$issueMilestone->getId().' has been opened');
318
+        $this->get('session')->getFlashBag()->add('notice', 'Milestone #' . $issueMilestone->getId() . ' has been opened');
319 319
 
320 320
         return $this->redirect($this->generateUrl('issuemilestone_show', array('id' => $this->project->getId(), 'milestoneId' => $issueMilestone->getId())));
321 321
     }
Please login to merge, or discard this patch.
app/src/VersionControl/GitControlBundle/Controller/ProjectTagController.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                     $this->get('session')->getFlashBag()->add('error', $e->getMessage());
155 155
                 }
156 156
 
157
-               //return $this->redirect($this->generateUrl('project_push', array('id' => $id)));
157
+                //return $this->redirect($this->generateUrl('project_push', array('id' => $id)));
158 158
                 $data = ['redirect' => $this->generateUrl('project_tags', array('id' => $this->project->getId()))];
159 159
 
160 160
                 return $this->viewHandler($data, 'json', true);
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         $gitRemoteVersions = $this->gitCommands->command('sync')->getRemoteVersions();
169 169
         
170 170
         $content = $this->render('VersionControlGitControlBundle:ProjectTag:pushTag.html.twig', 
171
-             array_merge($this->viewVariables, array(
171
+                array_merge($this->viewVariables, array(
172 172
                 'remoteVersions' => $gitRemoteVersions,
173 173
                 'push_form' => $form->createView()
174 174
             )
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $tags = $this->gitCommands->command('tag')->getTags();
46 46
 
47
-        $defaultData =array();
47
+        $defaultData = array();
48 48
         $form = $this->createNewTagForm($this->project, $defaultData);
49 49
 
50 50
         return array_merge($this->viewVariables, array(
@@ -108,12 +108,12 @@  discard block
 block discarded – undo
108 108
                 ->add('name', TextType::class, array(
109 109
                     'label' => 'Tag Name', 'required' => true, 'constraints' => array(
110 110
                         new NotBlank(),
111
-                    ), )
111
+                    ),)
112 112
                 )
113 113
                 ->add('message', TextType::class, array(
114 114
                     'label' => 'Tag Message', 'required' => true, 'constraints' => array(
115 115
                         new NotBlank(),
116
-                    ), )
116
+                    ),)
117 117
                 )
118 118
                 ->add('commit', HiddenType::class)
119 119
                 ->getForm();
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     public function pushTagAction(Request $request, $tag, $responseType)
136 136
     {
137 137
         $success = true;
138
-        $form = $this->createPushTagForm($this->project,$tag);
138
+        $form = $this->createPushTagForm($this->project, $tag);
139 139
         $form->add('push', SubmitType::class, array('label' => 'Push'));
140 140
         
141 141
         $form->handleRequest($request);
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         $gitRemoteVersions = $this->gitCommands->command('sync')->getRemoteVersions();
191 191
         $remoteChoices = array();
192 192
         foreach ($gitRemoteVersions as $remoteVersion) {
193
-            $remoteChoices[$remoteVersion[0].'('.$remoteVersion[1].')'] = $remoteVersion[0];
193
+            $remoteChoices[$remoteVersion[0] . '(' . $remoteVersion[1] . ')'] = $remoteVersion[0];
194 194
         }
195 195
 
196 196
         $firstOrigin = reset($remoteChoices);
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             ->add('remote', ChoiceType::class, array(
205 205
                 'label' => 'Remote Server', 'choices' => $remoteChoices, 'data' => $firstOrigin, 'required' => false, 'choices_as_values' => true, 'constraints' => array(
206 206
                     new NotBlank(),
207
-                ), )
207
+                ),)
208 208
             )
209 209
             ->add('tag', HiddenType::class)
210 210
             ->getForm();
Please login to merge, or discard this patch.
src/VersionControl/GitControlBundle/Controller/ProjectSyncController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
             $data = $pullForm->getData();
150 150
             $remote = $data['remote'];
151 151
             $branch = $data['branch'];
152
-             //die('form valid');
152
+                //die('form valid');
153 153
             if ($pullForm->get('viewDiff')->isClicked()) {
154 154
                 $response = $this->gitSyncCommands->fetch($remote, $branch);
155 155
                 $this->get('session')->getFlashBag()->add('notice', $response);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         $gitRemoteVersions = $this->gitSyncCommands->getRemoteVersions();
197 197
         $remoteChoices = array();
198 198
         foreach ($gitRemoteVersions as $remoteVersion) {
199
-            $remoteChoices[$remoteVersion[0].'('.$remoteVersion[1].')'] = $remoteVersion[0];
199
+            $remoteChoices[$remoteVersion[0] . '(' . $remoteVersion[1] . ')'] = $remoteVersion[0];
200 200
         }
201 201
 
202 202
         //Local Branch choice
@@ -219,12 +219,12 @@  discard block
 block discarded – undo
219 219
             ->add('remote', ChoiceType::class, array(
220 220
                 'label' => 'Remote Server', 'choices' => $remoteChoices, 'data' => $firstOrigin, 'required' => false, 'choices_as_values' => true, 'constraints' => array(
221 221
                     new NotBlank(),
222
-                ), )
222
+                ),)
223 223
             )
224 224
             ->add('branch', ChoiceType::class, array(
225 225
                 'label' => 'Branch', 'choices' => $branchChoices, 'preferred_choices' => array($currentBranch), 'data' => trim($currentBranch), 'required' => false, 'choices_as_values' => true, 'constraints' => array(
226 226
                     new NotBlank(),
227
-                ), )
227
+                ),)
228 228
             )
229 229
             ->getForm();
230 230
 
Please login to merge, or discard this patch.
src/VersionControl/GitControlBundle/Utility/ProjectEnvironmentStorage.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function setProjectEnvironment($projectId, $projectEnvironmentId)
55 55
     {
56
-        $this->session->set('projectEnvironment'.$projectId, $projectEnvironmentId);
56
+        $this->session->set('projectEnvironment' . $projectId, $projectEnvironmentId);
57 57
     }
58 58
 
59 59
     /**
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function getProjectEnviromment(Project $project)
67 67
     {
68
-        if ($this->session->has('projectEnvironment'.$project->getId())) {
69
-            $projectEnvironmentId = $this->session->get('projectEnvironment'.$project->getId());
68
+        if ($this->session->has('projectEnvironment' . $project->getId())) {
69
+            $projectEnvironmentId = $this->session->get('projectEnvironment' . $project->getId());
70 70
 
71 71
             $currentProjectEnvironment = $this->em->getRepository('VersionControlGitControlBundle:ProjectEnvironment')->find($projectEnvironmentId);
72 72
             if ($currentProjectEnvironment->getProject()->getId() === $project->getId()) {
Please login to merge, or discard this patch.
GitControlBundle/Security/Authentication/FOSVersionUserProvider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
         $username = $response->getUsername();
26 26
         //on connect - get the access token and the user ID
27 27
         $service = $response->getResourceOwner()->getName();
28
-        $setter = 'set'.ucfirst($service);
29
-        $setter_id = $setter.'Id';
30
-        $setter_token = $setter.'AccessToken';
28
+        $setter = 'set' . ucfirst($service);
29
+        $setter_id = $setter . 'Id';
30
+        $setter_token = $setter . 'AccessToken';
31 31
 
32 32
         //we "disconnect" previously connected users
33 33
         if (null !== $previousUser = $this->userManager->findUserBy(array($property => $username))) {
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
         //when the user is registrating
52 52
         if (null === $user) {
53 53
             $service = $response->getResourceOwner()->getName();
54
-            $setter = 'set'.ucfirst($service);
55
-            $setter_id = $setter.'Id';
56
-            $setter_token = $setter.'AccessToken';
54
+            $setter = 'set' . ucfirst($service);
55
+            $setter_id = $setter . 'Id';
56
+            $setter_token = $setter . 'AccessToken';
57 57
             // create new user here
58 58
             $user = $this->userManager->createUser();
59 59
             $user->$setter_id($username);
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
         //update access token
76 76
         $serviceName = $response->getResourceOwner()->getName();
77
-        $setter = 'set'.ucfirst($serviceName).'AccessToken';
77
+        $setter = 'set' . ucfirst($serviceName) . 'AccessToken';
78 78
         $user->$setter($response->getAccessToken());
79 79
 
80 80
         return $user;
Please login to merge, or discard this patch.