Test Setup Failed
Pull Request — master (#9)
by
unknown
11:27
created
VersionControl/GithubIssueBundle/Form/ProjectIssueIntegratorGithubType.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,15 +29,15 @@
 block discarded – undo
29 29
         ;
30 30
     }
31 31
 
32
-   /**
33
-    * @param OptionsResolverInterface $resolver
34
-    */
35
-   public function configureOptions(OptionsResolver $resolver)
36
-   {
37
-       $resolver->setDefaults(array(
32
+    /**
33
+     * @param OptionsResolverInterface $resolver
34
+     */
35
+    public function configureOptions(OptionsResolver $resolver)
36
+    {
37
+        $resolver->setDefaults(array(
38 38
             'data_class' => 'VersionControl\GithubIssueBundle\Entity\ProjectIssueIntegratorGithub',
39 39
         ));
40
-   }
40
+    }
41 41
 
42 42
     /**
43 43
      * @return string
Please login to merge, or discard this patch.
src/VersionControl/GithubIssueBundle/Form/IssueType.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@
 block discarded – undo
66 66
                     },*/
67 67
                 ))
68 68
             //->add('project', 'hidden_entity',array(
69
-             //       'class' => 'VersionControl\GitControlBundle\Entity\Project'
70
-             //   ))
69
+                //       'class' => 'VersionControl\GitControlBundle\Entity\Project'
70
+                //   ))
71 71
             //->add('verUser')
72 72
             ->add('issueLabel', ChoiceType::class, array(
73 73
                     'choices' => $this->getIssueLabelChoices(),
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -37,20 +37,20 @@  discard block
 block discarded – undo
37 37
             ->add('description', TextareaType::class)
38 38
             ->add('issueMilestone', 'choice', array(
39 39
                     'choices' => $this->getIssueMilestoneChoices(),
40
-                    'multiple' => false,   // Multiple selection allowed
40
+                    'multiple' => false, // Multiple selection allowed
41 41
                     //'expanded' => true,   // Render as checkboxes
42 42
                     'placeholder' => 'Choose a milestone',
43 43
                     'required' => false,
44 44
                     'choices_as_values' => true,
45 45
                     //'property' => 'title', // Assuming that the entity has a "name" property
46
-                    'choice_label' => function ($issueMilestone) {
46
+                    'choice_label' => function($issueMilestone) {
47 47
                         if ($issueMilestone) {
48 48
                             return $issueMilestone->getTitle();
49 49
                         }
50 50
 
51 51
                         return;
52 52
                     },
53
-                    'choice_value' => function ($issueMilestone) {
53
+                    'choice_value' => function($issueMilestone) {
54 54
                         if ($issueMilestone) {
55 55
                             return $issueMilestone->getId();
56 56
                         }
@@ -71,20 +71,20 @@  discard block
 block discarded – undo
71 71
             //->add('verUser')
72 72
             ->add('issueLabel', ChoiceType::class, array(
73 73
                     'choices' => $this->getIssueLabelChoices(),
74
-                    'multiple' => true,   // Multiple selection allowed
75
-                    'expanded' => true,   // Render as checkboxes
74
+                    'multiple' => true, // Multiple selection allowed
75
+                    'expanded' => true, // Render as checkboxes
76 76
                     //'property' => 'title', // Assuming that the entity has a "name" property
77 77
                     //'class' => 'VersionControl\GitControlBundle\Entity\IssueLabel',
78 78
                     'required' => false,
79 79
                     'choices_as_values' => true,
80
-                    'choice_label' => function ($issueLabel) {
80
+                    'choice_label' => function($issueLabel) {
81 81
                         if ($issueLabel) {
82 82
                             return $issueLabel->getTitle();
83 83
                         }
84 84
 
85 85
                         return;
86 86
                     },
87
-                    'choice_value' => function ($issueLabel) {
87
+                    'choice_value' => function($issueLabel) {
88 88
                         if ($issueLabel) {
89 89
                             return $issueLabel->getId();
90 90
                         }
Please login to merge, or discard this patch.
src/VersionControl/GithubIssueBundle/Form/IssueEditType.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -38,20 +38,20 @@  discard block
 block discarded – undo
38 38
                     )
39 39
             ->add('issueMilestone', ChoiceType::class, array(
40 40
                     'choices' => $this->getIssueMilestoneChoices(),
41
-                    'multiple' => false,   // Multiple selection allowed
41
+                    'multiple' => false, // Multiple selection allowed
42 42
                     //'expanded' => true,   // Render as checkboxes
43 43
                     'placeholder' => 'Choose a milestone',
44 44
                     'required' => false,
45 45
                     'choices_as_values' => true,
46 46
                     //'property' => 'title', // Assuming that the entity has a "name" property
47
-                    'choice_label' => function ($issueMilestone) {
47
+                    'choice_label' => function($issueMilestone) {
48 48
                         if ($issueMilestone) {
49 49
                             return $issueMilestone->getTitle();
50 50
                         }
51 51
 
52 52
                         return;
53 53
                     },
54
-                    'choice_value' => function ($issueMilestone) {
54
+                    'choice_value' => function($issueMilestone) {
55 55
                         if ($issueMilestone) {
56 56
                             return $issueMilestone->getId();
57 57
                         }
@@ -68,20 +68,20 @@  discard block
 block discarded – undo
68 68
                 ))
69 69
             ->add('issueLabel', ChoiceType::class, array(
70 70
                     'choices' => $this->getIssueLabelChoices(),
71
-                    'multiple' => true,   // Multiple selection allowed
72
-                    'expanded' => true,   // Render as checkboxes
71
+                    'multiple' => true, // Multiple selection allowed
72
+                    'expanded' => true, // Render as checkboxes
73 73
                     //'property' => 'title', // Assuming that the entity has a "name" property
74 74
                     //'class' => 'VersionControl\GitControlBundle\Entity\IssueLabel',
75 75
                     'required' => false,
76 76
                     'choices_as_values' => true,
77
-                    'choice_label' => function ($issueLabel) {
77
+                    'choice_label' => function($issueLabel) {
78 78
                         if ($issueLabel) {
79 79
                             return $issueLabel->getTitle();
80 80
                         }
81 81
 
82 82
                         return;
83 83
                     },
84
-                    'choice_value' => function ($issueLabel) {
84
+                    'choice_value' => function($issueLabel) {
85 85
                         if ($issueLabel) {
86 86
                             return $issueLabel->getId();
87 87
                         }
Please login to merge, or discard this patch.
src/VersionControl/GithubIssueBundle/Repository/GithubBase.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     public function __construct()
37 37
     {
38 38
         $this->client = new \Github\Client(
39
-               new \Github\HttpClient\CachedHttpClient(array('cache_dir' => $this->getCacheDir()))
39
+                new \Github\HttpClient\CachedHttpClient(array('cache_dir' => $this->getCacheDir()))
40 40
         );
41 41
     }
42 42
 
Please login to merge, or discard this patch.
src/VersionControl/GitCommandBundle/GitCommands/GitCommand.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -396,28 +396,28 @@
 block discarded – undo
396 396
                 break;
397 397
             case 'commit':
398 398
                  $command = new Command\GitCommitCommand($this);
399
-                 break;
399
+                    break;
400 400
             case 'diff':
401 401
                  $command = new Command\GitDiffCommand($this);
402
-                 break;
402
+                    break;
403 403
             case 'files':
404 404
                  $command = new Command\GitFilesCommand($this);
405
-                 break;
405
+                    break;
406 406
             case 'init':
407 407
                  $command = new Command\GitInitCommand($this);
408
-                 break;
408
+                    break;
409 409
             case 'log':
410 410
                  $command = new Command\GitLogCommand($this);
411
-                 break;
411
+                    break;
412 412
             case 'status':
413 413
                  $command = new Command\GitStatusCommand($this);
414
-                 break;
414
+                    break;
415 415
             case 'sync':
416 416
                  $command = new Command\GitSyncCommand($this);
417
-                 break;
417
+                    break;
418 418
             case 'undo':
419 419
                  $command = new Command\GitUndoCommand($this);
420
-                 break;
420
+                    break;
421 421
             default:
422 422
                 throw new InvalidArgumentException(sprintf('Unknown command instance called: "%s"', $name));
423 423
         }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@
 block discarded – undo
219 219
      */
220 220
     protected function setGitPath($gitPath)
221 221
     {
222
-        $this->gitPath = rtrim(trim($gitPath), DIRECTORY_SEPARATOR );
222
+        $this->gitPath = rtrim(trim($gitPath), DIRECTORY_SEPARATOR);
223 223
 
224 224
         return $this;
225 225
     }
Please login to merge, or discard this patch.
VersionControl/GitCommandBundle/GitCommands/Command/GitBranchCommand.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             return true;
205 205
         } else {
206 206
             //$output = $this->command->runCommand(sprintf('(git check-ref-format "refs/heads/%s");echo -e "\n$?"',$branchName));
207
-           $response = $this->command->runCommand(sprintf('git check-ref-format "refs/heads/%s"', $branchName), false);
207
+            $response = $this->command->runCommand(sprintf('git check-ref-format "refs/heads/%s"', $branchName), false);
208 208
 
209 209
             if ($this->command->getLastExitStatus() !== 0) {
210 210
                 return false;
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
     {
327 327
         $response = $this->command->runCommand('git merge --abort 2>&1');
328 328
 
329
-         //Trigger file alter Event
329
+            //Trigger file alter Event
330 330
         $this->triggerGitAlterFilesEvent();
331 331
 
332 332
         return $response;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
             $output = $this->command->runCommand(sprintf('git branch %s', escapeshellarg($branchName)));
153 153
 
154 154
             if ($switchToBranch) {
155
-                $output .= $this->command->runCommand(sprintf('git checkout %s 2>&1',  escapeshellarg($branchName)));
155
+                $output .= $this->command->runCommand(sprintf('git checkout %s 2>&1', escapeshellarg($branchName)));
156 156
 
157 157
                 //Trigger file alter Event
158 158
                 $this->triggerGitAlterFilesEvent();
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
             $output = $this->command->runCommand(sprintf('git branch %s %s 2>&1', escapeshellarg($branchName), escapeshellarg($remoteBranchName)));
181 181
 
182 182
             if ($switchToBranch) {
183
-                $output .= $this->command->runCommand(sprintf('git checkout %s 2>&1',  escapeshellarg($branchName)));
183
+                $output .= $this->command->runCommand(sprintf('git checkout %s 2>&1', escapeshellarg($branchName)));
184 184
                 //Trigger file alter Event
185 185
                 $this->triggerGitAlterFilesEvent();
186 186
             }
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
      */
248 248
     public function checkoutBranch($branchName)
249 249
     {
250
-        $response = $this->command->runCommand(sprintf('git checkout %s 2>&1',  escapeshellarg($branchName)));
250
+        $response = $this->command->runCommand(sprintf('git checkout %s 2>&1', escapeshellarg($branchName)));
251 251
 
252 252
         //Trigger file alter Event
253 253
         $this->triggerGitAlterFilesEvent();
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
             $deleteFlag = '-d';
279 279
         }
280 280
 
281
-        return $this->command->runCommand(sprintf('git branch '.$deleteFlag.' %s 2>&1',  escapeshellarg($branchName)));
281
+        return $this->command->runCommand(sprintf('git branch '.$deleteFlag.' %s 2>&1', escapeshellarg($branchName)));
282 282
     }
283 283
 
284 284
     /**
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
         if ($branchName === $currentBranch) {
296 296
             throw new \Exception('You cannot merge a branch with itself. Please checkout a different branch before trying to merge.');
297 297
         }
298
-        $response = $this->command->runCommand(sprintf('git merge --no-ff %s 2>&1',  escapeshellarg($branchName)));
298
+        $response = $this->command->runCommand(sprintf('git merge --no-ff %s 2>&1', escapeshellarg($branchName)));
299 299
 
300 300
         //Trigger file alter Event
301 301
         $this->triggerGitAlterFilesEvent();
Please login to merge, or discard this patch.
VersionControl/GitCommandBundle/GitCommands/Command/GitStatusCommand.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
     {
118 118
         $gitFiles = $this->getFilesToCommit();
119 119
 
120
-         //Validated that this status is same as previous
121
-         $deleteFiles = array();
120
+            //Validated that this status is same as previous
121
+            $deleteFiles = array();
122 122
         $addFiles = array();
123 123
 
124 124
         $flippedFiles = array_flip($files);
@@ -129,31 +129,31 @@  discard block
 block discarded – undo
129 129
                     //do Nothing ignore
130 130
                 } elseif (($fileEntity->getIndexStatus() == ' ' || $fileEntity->getIndexStatus() == 'M' || $fileEntity->getIndexStatus() == 'A') && $fileEntity->getWorkTreeStatus() == 'D') {
131 131
                     //Delete files
132
-                     //[ MA]     D    deleted in work tree
133
-                     $deleteFiles[] = escapeshellarg($fileEntity->getPath1());
132
+                        //[ MA]     D    deleted in work tree
133
+                        $deleteFiles[] = escapeshellarg($fileEntity->getPath1());
134 134
                 } elseif ($fileEntity->getIndexStatus() == 'R' && ($fileEntity->getWorkTreeStatus() == 'D')) {
135 135
                     //Rename delete
136
-                     //[R]     D    deleted in work tree
137
-                     //$deleteFiles[] = escapeshellarg($fileEntity->getPath1());
138
-                     $deleteFiles[] = escapeshellarg($fileEntity->getPath2());
136
+                        //[R]     D    deleted in work tree
137
+                        //$deleteFiles[] = escapeshellarg($fileEntity->getPath1());
138
+                        $deleteFiles[] = escapeshellarg($fileEntity->getPath2());
139 139
                 } elseif ($fileEntity->getIndexStatus() == 'R' && ($fileEntity->getWorkTreeStatus() == 'M' || $fileEntity->getWorkTreeStatus() == 'A' || $fileEntity->getWorkTreeStatus() == ' ')) {
140 140
                     //Rename ADD
141
-                     //[R]     [ M]
142
-                     //$deleteFiles[] = escapeshellarg($fileEntity->getPath1());
143
-                     $addFiles[] = escapeshellarg($fileEntity->getPath2());
141
+                        //[R]     [ M]
142
+                        //$deleteFiles[] = escapeshellarg($fileEntity->getPath1());
143
+                        $addFiles[] = escapeshellarg($fileEntity->getPath2());
144 144
                 } elseif ($fileEntity->getWorkTreeStatus() == ' ') {
145 145
                     //[MARC]           index and work tree matches
146
-                     //Do Nothing
146
+                        //Do Nothing
147 147
                 } else {
148 148
                     $addFiles[] = escapeshellarg($fileEntity->getPath1());
149 149
                 }
150 150
             }
151 151
         }
152 152
 
153
-         //Run the commands once for add and delete
154
-         if (count($deleteFiles) > 0) {
155
-             $this->command->runCommand('git rm '.implode(' ', $deleteFiles));
156
-         }
153
+            //Run the commands once for add and delete
154
+            if (count($deleteFiles) > 0) {
155
+                $this->command->runCommand('git rm '.implode(' ', $deleteFiles));
156
+            }
157 157
 
158 158
         if (count($addFiles) > 0) {
159 159
             $this->command->runCommand('git add '.implode(' ', $addFiles));
Please login to merge, or discard this patch.
src/VersionControl/GitCommandBundle/GitCommands/Command/GitDiffCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
      * Get array of conflict file names
129 129
      * @return array of conflict file names
130 130
      */
131
-    public function getConflictFileNames(){
131
+    public function getConflictFileNames() {
132 132
         
133 133
         $command = " git diff --name-only --diff-filter=U";
134 134
         $response = $this->command->runCommand($command);
Please login to merge, or discard this patch.
src/VersionControl/GitCommandBundle/GitCommands/Command/GitFilesCommand.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      */
121 121
     protected function sortFilesByDirectoryThenName(array &$fileArray)
122 122
     {
123
-        usort($fileArray, function ($a, $b) {
123
+        usort($fileArray, function($a, $b) {
124 124
             if ($a->isDir()) {
125 125
                 if ($b->isDir()) {
126 126
                     return strnatcasecmp($a->getFilename(), $b->getFilename());
@@ -348,13 +348,13 @@  discard block
 block discarded – undo
348 348
         $response = '';
349 349
         if ($this->fileExists($filePath)) {
350 350
             
351
-            if($this->isFileTracked($filePath)){
351
+            if ($this->isFileTracked($filePath)) {
352 352
                 throw new \VersionControl\GitCommandBundle\GitCommands\Exception\FileStatusException('File path is been tracked. Please untrack file first');
353 353
             }
354 354
             
355
-            if($this->isFileIgnored($filePath) === false){
355
+            if ($this->isFileIgnored($filePath) === false) {
356 356
                 $response = $this->addToGitIgnore($filePath);
357
-            }else {
357
+            } else {
358 358
                 throw new \VersionControl\GitCommandBundle\GitCommands\Exception\FileStatusException('File path is already ignored');
359 359
             }
360 360
 
@@ -382,15 +382,15 @@  discard block
 block discarded – undo
382 382
         $response = '';
383 383
         if ($this->fileExists($filePath)) {
384 384
             
385
-            if($this->isFileTracked($filePath)){
385
+            if ($this->isFileTracked($filePath)) {
386 386
                 $statusCount = $this->command->command('commit')->countStatus();
387
-                if($statusCount <= 0){
387
+                if ($statusCount <= 0) {
388 388
                     $response .= $this->command->runCommand(sprintf('git rm --cached %s', escapeshellarg($filePath)));
389 389
                     $response .= "\n Please commit to complete the removal of this file from git index";
390
-                }else{
390
+                } else {
391 391
                     throw new \VersionControl\GitCommandBundle\GitCommands\Exception\FileStatusException('Please commit all files first');
392 392
                 }
393
-            }else{
393
+            } else {
394 394
                 throw new \VersionControl\GitCommandBundle\GitCommands\Exception\FileStatusException('File path is not been tracked');
395 395
             }
396 396
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
             
355 355
             if($this->isFileIgnored($filePath) === false){
356 356
                 $response = $this->addToGitIgnore($filePath);
357
-            }else {
357
+            } else {
358 358
                 throw new \VersionControl\GitCommandBundle\GitCommands\Exception\FileStatusException('File path is already ignored');
359 359
             }
360 360
 
@@ -387,10 +387,10 @@  discard block
 block discarded – undo
387 387
                 if($statusCount <= 0){
388 388
                     $response .= $this->command->runCommand(sprintf('git rm --cached %s', escapeshellarg($filePath)));
389 389
                     $response .= "\n Please commit to complete the removal of this file from git index";
390
-                }else{
390
+                } else{
391 391
                     throw new \VersionControl\GitCommandBundle\GitCommands\Exception\FileStatusException('Please commit all files first');
392 392
                 }
393
-            }else{
393
+            } else{
394 394
                 throw new \VersionControl\GitCommandBundle\GitCommands\Exception\FileStatusException('File path is not been tracked');
395 395
             }
396 396
 
Please login to merge, or discard this patch.