Completed
Push — master ( 9aa90f...051175 )
by Paul
06:58
created
GitlabIssueBundle/Form/EventListener/AddProjectNameFieldSubscriber.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,18 +33,18 @@  discard block
 block discarded – undo
33 33
         if ($projectIssueIntegratorGitlab && $projectIssueIntegratorGitlab instanceof \VersionControl\GitlabIssueBundle\Entity\ProjectIssueIntegratorGitlab) {
34 34
             $form->add('projectName', GitlabProjectType::class, array(
35 35
                     'choices' => $this->getProjectChoices($projectIssueIntegratorGitlab),
36
-                    'multiple' => false,   // Multiple selection allowed
36
+                    'multiple' => false, // Multiple selection allowed
37 37
                     'placeholder' => 'Choose a projecton Gitlab',
38 38
                     'required' => false,
39 39
                     'choices_as_values' => true,
40
-                    'choice_label' => function ($gitLabProject) {
40
+                    'choice_label' => function($gitLabProject) {
41 41
                         if ($gitLabProject) {
42 42
                             return $gitLabProject->getName();
43 43
                         }
44 44
 
45 45
                         return;
46 46
                     },
47
-                    'choice_value' => function ($gitLabProject) {
47
+                    'choice_value' => function($gitLabProject) {
48 48
                         if ($gitLabProject) {
49 49
                             return $gitLabProject->getId();
50 50
                         }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
     protected function getProjectChoices(\VersionControl\GitlabIssueBundle\Entity\ProjectIssueIntegratorGitlab $projectIssueIntegrator)
60 60
     {
61
-        $client = new \Gitlab\Client(rtrim($projectIssueIntegrator->getUrl(), '/').'/api/v3/'); // change here
61
+        $client = new \Gitlab\Client(rtrim($projectIssueIntegrator->getUrl(), '/') . '/api/v3/'); // change here
62 62
         $client->authenticate($projectIssueIntegrator->getApiToken(), \Gitlab\Client::AUTH_URL_TOKEN);
63 63
         $choices = array();
64 64
         $dataResponse = $client->api('projects')->all(1, 200);
Please login to merge, or discard this patch.
app/src/VersionControl/GitlabIssueBundle/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.
DependencyInjection/VersionControlGitlabIssueExtension.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
         $configuration = new Configuration();
31 31
         $config = $this->processConfiguration($configuration, $configs);
32 32
 
33
-        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
33
+        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
34 34
         $loader->load('services.yml');
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
app/src/VersionControl/GitCommandBundle/Logger/GitCommandLogger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
 
75 75
         if (null !== $this->logger) {
76 76
             $message = sprintf('%s (%s) %0.2f ms', $command, $method, $time * 1000);
77
-            $this->logger->info($message, (array)$data);
77
+            $this->logger->info($message, (array) $data);
78 78
         }
79 79
     }
80 80
 
Please login to merge, or discard this patch.
src/VersionControl/GitCommandBundle/GitCommands/Command/GitFilesCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@
 block discarded – undo
148 148
      */
149 149
     protected function sortFilesByDirectoryThenName(array &$fileArray): void
150 150
     {
151
-        usort($fileArray, static function (FileInfoInterface $a, FileInfoInterface $b) {
151
+        usort($fileArray, static function(FileInfoInterface $a, FileInfoInterface $b) {
152 152
             if ($a->isDir()) {
153 153
                 if ($b->isDir()) {
154 154
                     return strnatcasecmp($a->getFilename(), $b->getFilename());
Please login to merge, or discard this patch.
src/VersionControl/GitCommandBundle/GitCommands/Command/GitDiffCommand.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     public function getDiffFile($filename)
70 70
     {
71
-        $diffString = $this->command->runCommand('git --no-pager diff  --oneline '.escapeshellarg($filename).'');
71
+        $diffString = $this->command->runCommand('git --no-pager diff  --oneline ' . escapeshellarg($filename) . '');
72 72
         $diffParser = new GitDiffParser($diffString);
73 73
         return $diffParser->parse();
74 74
     }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public function getDiffFileBetweenCommits($filename, $previousCommitHash, $commitHash)
88 88
     {
89
-        $diffString = $this->command->runCommand('git --no-pager diff  --oneline '.escapeshellarg($previousCommitHash).' '.escapeshellarg($commitHash).' -- '.escapeshellarg($filename).'');
89
+        $diffString = $this->command->runCommand('git --no-pager diff  --oneline ' . escapeshellarg($previousCommitHash) . ' ' . escapeshellarg($commitHash) . ' -- ' . escapeshellarg($filename) . '');
90 90
         $diffParser = new GitDiffParser($diffString);
91 91
         return $diffParser->parse();
92 92
     }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function getFilesInCommit($commitHash)
103 103
     {
104
-        $response = $this->command->runCommand('git diff-tree --no-commit-id --name-status -r '.escapeshellarg($commitHash).'');
104
+        $response = $this->command->runCommand('git diff-tree --no-commit-id --name-status -r ' . escapeshellarg($commitHash) . '');
105 105
         $responseLines = $this->splitOnNewLine($response);
106 106
         $files = new GitCommitFileCollection();
107 107
         foreach ($responseLines as $line) {
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
     public function getPreviousCommitHash($commitHash = 'HEAD', $fileName = false)
125 125
     {
126 126
         $previousCommitHash = '';
127
-        $command = " git log --pretty=format:'%h' -n 2 ".escapeshellarg($commitHash).'';
127
+        $command = " git log --pretty=format:'%h' -n 2 " . escapeshellarg($commitHash) . '';
128 128
         if ($fileName !== false) {
129
-            $command .= ' '.escapeshellarg($fileName);
129
+            $command .= ' ' . escapeshellarg($fileName);
130 130
         }
131 131
         $response = $this->command->runCommand($command);
132 132
         $responseLines = $this->splitOnNewLine($response);
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      * @throws RunGitCommandException
145 145
      * @throws RuntimeException
146 146
      */
147
-    public function getConflictFileNames(){
147
+    public function getConflictFileNames() {
148 148
 
149 149
         $command = ' git diff --name-only --diff-filter=U';
150 150
         $response = $this->command->runCommand($command);
Please login to merge, or discard this patch.
src/VersionControl/GitCommandBundle/GitCommands/Command/GitLogCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@
 block discarded – undo
185 185
     {
186 186
         $this->logCommand = 'git --no-pager log -m "--pretty=format:\'' . $this->format . '\'"';
187 187
         if ($this->logCount) {
188
-            $this->logCommand .= ' -' . (int)$this->logCount . ' ';
188
+            $this->logCommand .= ' -' . (int) $this->logCount . ' ';
189 189
         }
190 190
 
191 191
         if ($this->showReferences === true) {
Please login to merge, or discard this patch.
VersionControl/GitCommandBundle/GitCommands/Command/GitBranchCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -311,7 +311,7 @@
 block discarded – undo
311 311
         $currentBranch = $this->getCurrentBranch();
312 312
         if ($branchName === $currentBranch) {
313 313
             throw new RuntimeException(
314
-                'You cannot merge a branch with itself. Please checkout a '.
314
+                'You cannot merge a branch with itself. Please checkout a ' .
315 315
                 'different branch before trying to merge.'
316 316
             );
317 317
         }
Please login to merge, or discard this patch.
src/VersionControl/GitCommandBundle/GitCommands/Command/GitTagCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             throw new InvalidBranchNameException('This is not a valid branch name');
66 66
         }
67 67
 
68
-        $command = sprintf($this->initGitCommand().' tag -a %s -m %s', escapeshellarg($version), escapeshellarg($message));
68
+        $command = sprintf($this->initGitCommand() . ' tag -a %s -m %s', escapeshellarg($version), escapeshellarg($message));
69 69
         if ($commitShortCode) {
70 70
             $command .= ' ' . escapeshellarg($commitShortCode);
71 71
         }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function pushTag($remote, $tag): string
87 87
     {
88
-        $command = sprintf($this->initGitCommand().' push %s %s', escapeshellarg(trim($remote)), escapeshellarg(trim($tag)));
88
+        $command = sprintf($this->initGitCommand() . ' push %s %s', escapeshellarg(trim($remote)), escapeshellarg(trim($tag)));
89 89
 
90 90
         return $this->command->runCommand($command);
91 91
     }
Please login to merge, or discard this patch.