Test Failed
Push — develop ( d5bd6e...e1ac99 )
by Àlex
07:15
created
PHPCI/Plugin/PhpCpd.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,9 +110,9 @@
 block discarded – undo
110 110
     /**
111 111
      * Process the PHPCPD XML report.
112 112
      *
113
-     * @param $xmlString
113
+     * @param string $xmlString
114 114
      *
115
-     * @return array
115
+     * @return integer
116 116
      *
117 117
      * @throws \Exception
118 118
      */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     {
75 75
         $ignore = '';
76 76
         if (count($this->ignore)) {
77
-            $map = function ($item) {
77
+            $map = function($item) {
78 78
                 // remove the trailing slash
79 79
                 $item = rtrim($item, DIRECTORY_SEPARATOR);
80 80
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         $warnings = 0;
129 129
         foreach ($xml->duplication as $duplication) {
130 130
             foreach ($duplication->file as $file) {
131
-                $fileName = (string) $file['path'];
131
+                $fileName = (string)$file['path'];
132 132
                 $fileName = str_replace($this->phpci->buildPath, '', $fileName);
133 133
 
134 134
                 $message = <<<CPD
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
                     BuildError::SEVERITY_NORMAL,
147 147
                     $fileName,
148 148
                     $file['line'],
149
-                    (int) $file['line'] + (int) $duplication['lines']
149
+                    (int)$file['line'] + (int)$duplication['lines']
150 150
                 );
151 151
             }
152 152
 
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPCI - Continuous Integration for PHP.
4
- *
5
- * @copyright    Copyright 2014, Block 8 Limited.
6
- * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
- *
8
- * @link         https://www.phptesting.org/
9
- */
3
+     * PHPCI - Continuous Integration for PHP.
4
+     *
5
+     * @copyright    Copyright 2014, Block 8 Limited.
6
+     * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
+     *
8
+     * @link         https://www.phptesting.org/
9
+     */
10 10
 
11 11
 namespace PHPCI\Service;
12 12
 
Please login to merge, or discard this patch.
PHPCI/Plugin/PhpMessDetector.php 3 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      * Override a default setting.
137 137
      *
138 138
      * @param $options
139
-     * @param $key
139
+     * @param string $key
140 140
      */
141 141
     protected function overrideSetting($options, $key)
142 142
     {
@@ -148,9 +148,9 @@  discard block
 block discarded – undo
148 148
     /**
149 149
      * Process PHPMD's XML output report.
150 150
      *
151
-     * @param $xmlString
151
+     * @param string $xmlString
152 152
      *
153
-     * @return array
153
+     * @return integer
154 154
      *
155 155
      * @throws \Exception
156 156
      */
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
     /**
213 213
      * Execute PHP Mess Detector.
214 214
      *
215
-     * @param $binaryPath
215
+     * @param null|string $binaryPath
216 216
      */
217 217
     protected function executePhpMd($binaryPath)
218 218
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         }
106 106
 
107 107
         if (array_key_exists('allowed_warnings', $options)) {
108
-            $this->allowed_warnings = (int) $options['allowed_warnings'];
108
+            $this->allowed_warnings = (int)$options['allowed_warnings'];
109 109
         }
110 110
 
111 111
         foreach (array('rules', 'ignore', 'suffixes') as $key) {
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         $warnings = 0;
167 167
 
168 168
         foreach ($xml->file as $file) {
169
-            $fileName = (string) $file['name'];
169
+            $fileName = (string)$file['name'];
170 170
             $fileName = str_replace($this->phpci->buildPath, '', $fileName);
171 171
 
172 172
             foreach ($file->violation as $violation) {
@@ -175,11 +175,11 @@  discard block
 block discarded – undo
175 175
                 $this->build->reportError(
176 176
                     $this->phpci,
177 177
                     'php_mess_detector',
178
-                    (string) $violation,
178
+                    (string)$violation,
179 179
                     PHPCI\Model\BuildError::SEVERITY_HIGH,
180 180
                     $fileName,
181
-                    (int) $violation['beginline'],
182
-                    (int) $violation['endline']
181
+                    (int)$violation['beginline'],
182
+                    (int)$violation['endline']
183 183
                 );
184 184
             }
185 185
         }
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPCI - Continuous Integration for PHP.
4
- *
5
- * @copyright    Copyright 2014, Block 8 Limited.
6
- * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
- *
8
- * @link         https://www.phptesting.org/
9
- */
3
+     * PHPCI - Continuous Integration for PHP.
4
+     *
5
+     * @copyright    Copyright 2014, Block 8 Limited.
6
+     * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
+     *
8
+     * @link         https://www.phptesting.org/
9
+     */
10 10
 
11 11
 namespace PHPCI\Service;
12 12
 
Please login to merge, or discard this patch.
PHPCI/Helper/BaseCommandExecutor.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,9 +87,9 @@
 block discarded – undo
87 87
 
88 88
         $status = 0;
89 89
         $descriptorSpec = array(
90
-            0 => array('pipe', 'r'),  // stdin
91
-            1 => array('pipe', 'w'),  // stdout
92
-            2 => array('pipe', 'w'),  // stderr
90
+            0 => array('pipe', 'r'), // stdin
91
+            1 => array('pipe', 'w'), // stdout
92
+            2 => array('pipe', 'w'), // stderr
93 93
         );
94 94
 
95 95
         $pipes = array();
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPCI - Continuous Integration for PHP.
4
- *
5
- * @copyright    Copyright 2014, Block 8 Limited.
6
- * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
- *
8
- * @link         https://www.phptesting.org/
9
- */
3
+     * PHPCI - Continuous Integration for PHP.
4
+     *
5
+     * @copyright    Copyright 2014, Block 8 Limited.
6
+     * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
+     *
8
+     * @link         https://www.phptesting.org/
9
+     */
10 10
 
11 11
 namespace PHPCI\Service;
12 12
 
Please login to merge, or discard this patch.
PHPCI/Helper/Diff.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 
47 47
         foreach ($diffLines as $diffLine) {
48 48
             if (preg_match('/@@\s+\-[0-9]+\,[0-9]+\s+\+([0-9]+)\,([0-9]+)/', $diffLine, $matches)) {
49
-                $lineNumber = (int) $matches[1] - 1;
49
+                $lineNumber = (int)$matches[1] - 1;
50 50
             }
51 51
 
52 52
             $rtn[$lineNumber] = $position;
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPCI - Continuous Integration for PHP.
4
- *
5
- * @copyright    Copyright 2015, Block 8 Limited.
6
- * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
- *
8
- * @link         https://www.phptesting.org/
9
- */
3
+     * PHPCI - Continuous Integration for PHP.
4
+     *
5
+     * @copyright    Copyright 2015, Block 8 Limited.
6
+     * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
+     *
8
+     * @link         https://www.phptesting.org/
9
+     */
10 10
 
11 11
 namespace PHPCI\Command;
12 12
 
Please login to merge, or discard this patch.
PHPCI/Logging/OutputLogHandler.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,6 +45,6 @@
 block discarded – undo
45 45
      */
46 46
     protected function write(array $record)
47 47
     {
48
-        $this->output->writeln((string) $record['formatted']);
48
+        $this->output->writeln((string)$record['formatted']);
49 49
     }
50 50
 }
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPCI - Continuous Integration for PHP.
4
- *
5
- * @copyright    Copyright 2014, Block 8 Limited.
6
- * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
- *
8
- * @link         https://www.phptesting.org/
9
- */
3
+     * PHPCI - Continuous Integration for PHP.
4
+     *
5
+     * @copyright    Copyright 2014, Block 8 Limited.
6
+     * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
+     *
8
+     * @link         https://www.phptesting.org/
9
+     */
10 10
 
11 11
 namespace PHPCI\Service;
12 12
 
Please login to merge, or discard this patch.
PHPCI/Logging/BuildDBLogHandler.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      */
51 51
     protected function write(array $record)
52 52
     {
53
-        $message = (string) $record['message'];
53
+        $message = (string)$record['message'];
54 54
         $message = str_replace($this->build->currentBuildPath, '/', $message);
55 55
 
56 56
         $this->logValue .= $message.PHP_EOL;
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPCI - Continuous Integration for PHP.
4
- *
5
- * @copyright    Copyright 2014, Block 8 Limited.
6
- * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
- *
8
- * @link         https://www.phptesting.org/
9
- */
3
+     * PHPCI - Continuous Integration for PHP.
4
+     *
5
+     * @copyright    Copyright 2014, Block 8 Limited.
6
+     * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
+     *
8
+     * @link         https://www.phptesting.org/
9
+     */
10 10
 
11 11
 namespace PHPCI\Service;
12 12
 
Please login to merge, or discard this patch.
PHPCI/Builder.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
 
403 403
         $self = $this;
404 404
         $pluginFactory->registerResource(
405
-            function () use ($self) {
405
+            function() use ($self) {
406 406
                 return $self;
407 407
             },
408 408
             null,
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
         );
411 411
 
412 412
         $pluginFactory->registerResource(
413
-            function () use ($build) {
413
+            function() use ($build) {
414 414
                 return $build;
415 415
             },
416 416
             null,
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 
420 420
         $logger = $this->logger;
421 421
         $pluginFactory->registerResource(
422
-            function () use ($logger) {
422
+            function() use ($logger) {
423 423
                 return $logger;
424 424
             },
425 425
             null,
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
         );
428 428
 
429 429
         $pluginFactory->registerResource(
430
-            function () use ($self) {
430
+            function() use ($self) {
431 431
                 $factory = new MailerFactory($self->getSystemConfig('phpci'));
432 432
 
433 433
                 return $factory->getSwiftMailerFromConfig();
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPCI - Continuous Integration for PHP.
4
- *
5
- * @copyright    Copyright 2014, Block 8 Limited.
6
- * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
- *
8
- * @link         https://www.phptesting.org/
9
- */
3
+     * PHPCI - Continuous Integration for PHP.
4
+     *
5
+     * @copyright    Copyright 2014, Block 8 Limited.
6
+     * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
+     *
8
+     * @link         https://www.phptesting.org/
9
+     */
10 10
 
11 11
 namespace PHPCI\Service;
12 12
 
Please login to merge, or discard this patch.
PHPCI/Store/BuildStore.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         if ($stmt->execute()) {
49 49
             $res = $stmt->fetchAll(\PDO::FETCH_ASSOC);
50 50
 
51
-            $map = function ($item) {
51
+            $map = function($item) {
52 52
                 return new \PHPCI\Model\Build($item);
53 53
             };
54 54
             $rtn = array_map($map, $res);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         if ($stmt->execute()) {
102 102
             $res = $stmt->fetchAll(\PDO::FETCH_ASSOC);
103 103
 
104
-            $map = function ($item) {
104
+            $map = function($item) {
105 105
                 return new Build($item);
106 106
             };
107 107
 
@@ -173,9 +173,9 @@  discard block
 block discarded – undo
173 173
 
174 174
         $stmt = Database::getConnection('read')->prepare($query);
175 175
         $stmt->bindValue(':key', $key, \PDO::PARAM_STR);
176
-        $stmt->bindValue(':projectId', (int) $projectId, \PDO::PARAM_INT);
177
-        $stmt->bindValue(':buildId', (int) $buildId, \PDO::PARAM_INT);
178
-        $stmt->bindValue(':numResults', (int) $numResults, \PDO::PARAM_INT);
176
+        $stmt->bindValue(':projectId', (int)$projectId, \PDO::PARAM_INT);
177
+        $stmt->bindValue(':buildId', (int)$buildId, \PDO::PARAM_INT);
178
+        $stmt->bindValue(':numResults', (int)$numResults, \PDO::PARAM_INT);
179 179
         if (!is_null($branch)) {
180 180
             $stmt->bindValue(':branch', $branch, \PDO::PARAM_STR);
181 181
         }
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
             $rtn = $stmt->fetchAll(\PDO::FETCH_ASSOC);
185 185
 
186 186
             $rtn = array_reverse($rtn);
187
-            $rtn = array_map(function ($item) {
187
+            $rtn = array_map(function($item) {
188 188
                 $item['meta_value'] = json_decode($item['meta_value'], true);
189 189
 
190 190
                 return $item;
@@ -217,8 +217,8 @@  discard block
 block discarded – undo
217 217
 
218 218
         $stmt = Database::getConnection('read')->prepare($query);
219 219
         $stmt->bindValue(':key', $key, \PDO::PARAM_STR);
220
-        $stmt->bindValue(':projectId', (int) $projectId, \PDO::PARAM_INT);
221
-        $stmt->bindValue(':buildId', (int) $buildId, \PDO::PARAM_INT);
220
+        $stmt->bindValue(':projectId', (int)$projectId, \PDO::PARAM_INT);
221
+        $stmt->bindValue(':buildId', (int)$buildId, \PDO::PARAM_INT);
222 222
         $stmt->bindValue(':value', $value, \PDO::PARAM_STR);
223 223
 
224 224
         if ($stmt->execute()) {
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPCI - Continuous Integration for PHP.
4
- *
5
- * @copyright    Copyright 2014, Block 8 Limited.
6
- * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
- *
8
- * @link         https://www.phptesting.org/
9
- */
3
+     * PHPCI - Continuous Integration for PHP.
4
+     *
5
+     * @copyright    Copyright 2014, Block 8 Limited.
6
+     * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
+     *
8
+     * @link         https://www.phptesting.org/
9
+     */
10 10
 
11 11
 namespace PHPCI\Service;
12 12
 
Please login to merge, or discard this patch.
PHPCI/Store/ProjectStore.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         if ($stmt->execute()) {
38 38
             $res = $stmt->fetchAll(\PDO::FETCH_ASSOC);
39 39
 
40
-            $map = function ($item) {
40
+            $map = function($item) {
41 41
                 return $item['branch'];
42 42
             };
43 43
             $rtn = array_map($map, $res);
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         if ($stmt->execute()) {
62 62
             $res = $stmt->fetchAll(\PDO::FETCH_ASSOC);
63 63
 
64
-            $map = function ($item) {
64
+            $map = function($item) {
65 65
                 return new Project($item);
66 66
             };
67 67
             $rtn = array_map($map, $res);
@@ -94,12 +94,12 @@  discard block
 block discarded – undo
94 94
         $query = 'SELECT * FROM `project` WHERE `group_id` = :group_id ORDER BY title LIMIT :limit';
95 95
         $stmt = Database::getConnection($useConnection)->prepare($query);
96 96
         $stmt->bindValue(':group_id', $value);
97
-        $stmt->bindValue(':limit', (int) $limit, \PDO::PARAM_INT);
97
+        $stmt->bindValue(':limit', (int)$limit, \PDO::PARAM_INT);
98 98
 
99 99
         if ($stmt->execute()) {
100 100
             $res = $stmt->fetchAll(\PDO::FETCH_ASSOC);
101 101
 
102
-            $map = function ($item) {
102
+            $map = function($item) {
103 103
                 return new Project($item);
104 104
             };
105 105
             $rtn = array_map($map, $res);
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPCI - Continuous Integration for PHP.
4
- *
5
- * @copyright    Copyright 2014, Block 8 Limited.
6
- * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
- *
8
- * @link         https://www.phptesting.org/
9
- */
3
+     * PHPCI - Continuous Integration for PHP.
4
+     *
5
+     * @copyright    Copyright 2014, Block 8 Limited.
6
+     * @license      https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
+     *
8
+     * @link         https://www.phptesting.org/
9
+     */
10 10
 
11 11
 namespace PHPCI\Service;
12 12
 
Please login to merge, or discard this patch.