Test Setup Failed
Push — develop ( 4d8ae2...dad829 )
by Àlex
07:22
created
PHPCI/Model/Base/BuildErrorBase.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
     * Set the value of CreatedDate / created_date.
429 429
     *
430 430
     * Must not be null.
431
-    * @param $value \DateTime
431
+    * @param \DateTime $value \DateTime
432 432
     */
433 433
     public function setCreatedDate($value)
434 434
     {
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
     /**
474 474
     * Set Build - Accepts an ID, an array representing a Build or a Build model.
475 475
     *
476
-    * @param $value mixed
476
+    * @param Model\Build $value mixed
477 477
     */
478 478
     public function setBuild($value)
479 479
     {
Please login to merge, or discard this patch.
Indentation   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -15,23 +15,23 @@  discard block
 block discarded – undo
15 15
 class BuildErrorBase extends Model
16 16
 {
17 17
     /**
18
-    * @var array
19
-    */
18
+     * @var array
19
+     */
20 20
     public static $sleepable = array();
21 21
 
22 22
     /**
23
-    * @var string
24
-    */
23
+     * @var string
24
+     */
25 25
     protected $tableName = 'build_error';
26 26
 
27 27
     /**
28
-    * @var string
29
-    */
28
+     * @var string
29
+     */
30 30
     protected $modelName = 'BuildError';
31 31
 
32 32
     /**
33
-    * @var array
34
-    */
33
+     * @var array
34
+     */
35 35
     protected $data = array(
36 36
         'id' => null,
37 37
         'build_id' => null,
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
     );
46 46
 
47 47
     /**
48
-    * @var array
49
-    */
48
+     * @var array
49
+     */
50 50
     protected $getters = array(
51 51
         // Direct property getters:
52 52
         'id' => 'getId',
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
     );
65 65
 
66 66
     /**
67
-    * @var array
68
-    */
67
+     * @var array
68
+     */
69 69
     protected $setters = array(
70 70
         // Direct property setters:
71 71
         'id' => 'setId',
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
     );
84 84
 
85 85
     /**
86
-    * @var array
87
-    */
86
+     * @var array
87
+     */
88 88
     public $columns = array(
89 89
         'id' => array(
90 90
             'type' => 'int',
@@ -138,16 +138,16 @@  discard block
 block discarded – undo
138 138
     );
139 139
 
140 140
     /**
141
-    * @var array
142
-    */
141
+     * @var array
142
+     */
143 143
     public $indexes = array(
144 144
             'PRIMARY' => array('unique' => true, 'columns' => 'id'),
145 145
             'build_id' => array('columns' => 'build_id, created_date'),
146 146
     );
147 147
 
148 148
     /**
149
-    * @var array
150
-    */
149
+     * @var array
150
+     */
151 151
     public $foreignKeys = array(
152 152
             'build_error_ibfk_1' => array(
153 153
                 'local_col' => 'build_id',
@@ -159,10 +159,10 @@  discard block
 block discarded – undo
159 159
     );
160 160
 
161 161
     /**
162
-    * Get the value of Id / id.
163
-    *
164
-    * @return int
165
-    */
162
+     * Get the value of Id / id.
163
+     *
164
+     * @return int
165
+     */
166 166
     public function getId()
167 167
     {
168 168
         $rtn    = $this->data['id'];
@@ -171,10 +171,10 @@  discard block
 block discarded – undo
171 171
     }
172 172
 
173 173
     /**
174
-    * Get the value of BuildId / build_id.
175
-    *
176
-    * @return int
177
-    */
174
+     * Get the value of BuildId / build_id.
175
+     *
176
+     * @return int
177
+     */
178 178
     public function getBuildId()
179 179
     {
180 180
         $rtn    = $this->data['build_id'];
@@ -183,10 +183,10 @@  discard block
 block discarded – undo
183 183
     }
184 184
 
185 185
     /**
186
-    * Get the value of Plugin / plugin.
187
-    *
188
-    * @return string
189
-    */
186
+     * Get the value of Plugin / plugin.
187
+     *
188
+     * @return string
189
+     */
190 190
     public function getPlugin()
191 191
     {
192 192
         $rtn    = $this->data['plugin'];
@@ -195,10 +195,10 @@  discard block
 block discarded – undo
195 195
     }
196 196
 
197 197
     /**
198
-    * Get the value of File / file.
199
-    *
200
-    * @return string
201
-    */
198
+     * Get the value of File / file.
199
+     *
200
+     * @return string
201
+     */
202 202
     public function getFile()
203 203
     {
204 204
         $rtn    = $this->data['file'];
@@ -207,10 +207,10 @@  discard block
 block discarded – undo
207 207
     }
208 208
 
209 209
     /**
210
-    * Get the value of LineStart / line_start.
211
-    *
212
-    * @return int
213
-    */
210
+     * Get the value of LineStart / line_start.
211
+     *
212
+     * @return int
213
+     */
214 214
     public function getLineStart()
215 215
     {
216 216
         $rtn    = $this->data['line_start'];
@@ -219,10 +219,10 @@  discard block
 block discarded – undo
219 219
     }
220 220
 
221 221
     /**
222
-    * Get the value of LineEnd / line_end.
223
-    *
224
-    * @return int
225
-    */
222
+     * Get the value of LineEnd / line_end.
223
+     *
224
+     * @return int
225
+     */
226 226
     public function getLineEnd()
227 227
     {
228 228
         $rtn    = $this->data['line_end'];
@@ -231,10 +231,10 @@  discard block
 block discarded – undo
231 231
     }
232 232
 
233 233
     /**
234
-    * Get the value of Severity / severity.
235
-    *
236
-    * @return int
237
-    */
234
+     * Get the value of Severity / severity.
235
+     *
236
+     * @return int
237
+     */
238 238
     public function getSeverity()
239 239
     {
240 240
         $rtn    = $this->data['severity'];
@@ -243,10 +243,10 @@  discard block
 block discarded – undo
243 243
     }
244 244
 
245 245
     /**
246
-    * Get the value of Message / message.
247
-    *
248
-    * @return string
249
-    */
246
+     * Get the value of Message / message.
247
+     *
248
+     * @return string
249
+     */
250 250
     public function getMessage()
251 251
     {
252 252
         $rtn    = $this->data['message'];
@@ -255,10 +255,10 @@  discard block
 block discarded – undo
255 255
     }
256 256
 
257 257
     /**
258
-    * Get the value of CreatedDate / created_date.
259
-    *
260
-    * @return \DateTime
261
-    */
258
+     * Get the value of CreatedDate / created_date.
259
+     *
260
+     * @return \DateTime
261
+     */
262 262
     public function getCreatedDate()
263 263
     {
264 264
         $rtn    = $this->data['created_date'];
@@ -271,11 +271,11 @@  discard block
 block discarded – undo
271 271
     }
272 272
 
273 273
     /**
274
-    * Set the value of Id / id.
275
-    *
276
-    * Must not be null.
277
-    * @param $value int
278
-    */
274
+     * Set the value of Id / id.
275
+     *
276
+     * Must not be null.
277
+     * @param $value int
278
+     */
279 279
     public function setId($value)
280 280
     {
281 281
         $this->_validateNotNull('Id', $value);
@@ -291,11 +291,11 @@  discard block
 block discarded – undo
291 291
     }
292 292
 
293 293
     /**
294
-    * Set the value of BuildId / build_id.
295
-    *
296
-    * Must not be null.
297
-    * @param $value int
298
-    */
294
+     * Set the value of BuildId / build_id.
295
+     *
296
+     * Must not be null.
297
+     * @param $value int
298
+     */
299 299
     public function setBuildId($value)
300 300
     {
301 301
         $this->_validateNotNull('BuildId', $value);
@@ -311,11 +311,11 @@  discard block
 block discarded – undo
311 311
     }
312 312
 
313 313
     /**
314
-    * Set the value of Plugin / plugin.
315
-    *
316
-    * Must not be null.
317
-    * @param $value string
318
-    */
314
+     * Set the value of Plugin / plugin.
315
+     *
316
+     * Must not be null.
317
+     * @param $value string
318
+     */
319 319
     public function setPlugin($value)
320 320
     {
321 321
         $this->_validateNotNull('Plugin', $value);
@@ -331,10 +331,10 @@  discard block
 block discarded – undo
331 331
     }
332 332
 
333 333
     /**
334
-    * Set the value of File / file.
335
-    *
336
-    * @param $value string
337
-    */
334
+     * Set the value of File / file.
335
+     *
336
+     * @param $value string
337
+     */
338 338
     public function setFile($value)
339 339
     {
340 340
         $this->_validateString('File', $value);
@@ -349,10 +349,10 @@  discard block
 block discarded – undo
349 349
     }
350 350
 
351 351
     /**
352
-    * Set the value of LineStart / line_start.
353
-    *
354
-    * @param $value int
355
-    */
352
+     * Set the value of LineStart / line_start.
353
+     *
354
+     * @param $value int
355
+     */
356 356
     public function setLineStart($value)
357 357
     {
358 358
         $this->_validateInt('LineStart', $value);
@@ -367,10 +367,10 @@  discard block
 block discarded – undo
367 367
     }
368 368
 
369 369
     /**
370
-    * Set the value of LineEnd / line_end.
371
-    *
372
-    * @param $value int
373
-    */
370
+     * Set the value of LineEnd / line_end.
371
+     *
372
+     * @param $value int
373
+     */
374 374
     public function setLineEnd($value)
375 375
     {
376 376
         $this->_validateInt('LineEnd', $value);
@@ -385,11 +385,11 @@  discard block
 block discarded – undo
385 385
     }
386 386
 
387 387
     /**
388
-    * Set the value of Severity / severity.
389
-    *
390
-    * Must not be null.
391
-    * @param $value int
392
-    */
388
+     * Set the value of Severity / severity.
389
+     *
390
+     * Must not be null.
391
+     * @param $value int
392
+     */
393 393
     public function setSeverity($value)
394 394
     {
395 395
         $this->_validateNotNull('Severity', $value);
@@ -405,11 +405,11 @@  discard block
 block discarded – undo
405 405
     }
406 406
 
407 407
     /**
408
-    * Set the value of Message / message.
409
-    *
410
-    * Must not be null.
411
-    * @param $value string
412
-    */
408
+     * Set the value of Message / message.
409
+     *
410
+     * Must not be null.
411
+     * @param $value string
412
+     */
413 413
     public function setMessage($value)
414 414
     {
415 415
         $this->_validateNotNull('Message', $value);
@@ -425,11 +425,11 @@  discard block
 block discarded – undo
425 425
     }
426 426
 
427 427
     /**
428
-    * Set the value of CreatedDate / created_date.
429
-    *
430
-    * Must not be null.
431
-    * @param $value \DateTime
432
-    */
428
+     * Set the value of CreatedDate / created_date.
429
+     *
430
+     * Must not be null.
431
+     * @param $value \DateTime
432
+     */
433 433
     public function setCreatedDate($value)
434 434
     {
435 435
         $this->_validateNotNull('CreatedDate', $value);
@@ -471,10 +471,10 @@  discard block
 block discarded – undo
471 471
     }
472 472
 
473 473
     /**
474
-    * Set Build - Accepts an ID, an array representing a Build or a Build model.
475
-    *
476
-    * @param $value mixed
477
-    */
474
+     * Set Build - Accepts an ID, an array representing a Build or a Build model.
475
+     *
476
+     * @param $value mixed
477
+     */
478 478
     public function setBuild($value)
479 479
     {
480 480
         // Is this an instance of Build?
@@ -492,10 +492,10 @@  discard block
 block discarded – undo
492 492
     }
493 493
 
494 494
     /**
495
-    * Set Build - Accepts a Build model.
496
-    * 
497
-    * @param $value \PHPCI\Model\Build
498
-    */
495
+     * Set Build - Accepts a Build model.
496
+     * 
497
+     * @param $value \PHPCI\Model\Build
498
+     */
499 499
     public function setBuildObject(\PHPCI\Model\Build $value)
500 500
     {
501 501
         return $this->setBuildId($value->getId());
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     */
166 166
     public function getId()
167 167
     {
168
-        $rtn    = $this->data['id'];
168
+        $rtn = $this->data['id'];
169 169
 
170 170
         return $rtn;
171 171
     }
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
     */
178 178
     public function getBuildId()
179 179
     {
180
-        $rtn    = $this->data['build_id'];
180
+        $rtn = $this->data['build_id'];
181 181
 
182 182
         return $rtn;
183 183
     }
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     */
190 190
     public function getPlugin()
191 191
     {
192
-        $rtn    = $this->data['plugin'];
192
+        $rtn = $this->data['plugin'];
193 193
 
194 194
         return $rtn;
195 195
     }
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
     */
202 202
     public function getFile()
203 203
     {
204
-        $rtn    = $this->data['file'];
204
+        $rtn = $this->data['file'];
205 205
 
206 206
         return $rtn;
207 207
     }
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
     */
214 214
     public function getLineStart()
215 215
     {
216
-        $rtn    = $this->data['line_start'];
216
+        $rtn = $this->data['line_start'];
217 217
 
218 218
         return $rtn;
219 219
     }
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
     */
226 226
     public function getLineEnd()
227 227
     {
228
-        $rtn    = $this->data['line_end'];
228
+        $rtn = $this->data['line_end'];
229 229
 
230 230
         return $rtn;
231 231
     }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
     */
238 238
     public function getSeverity()
239 239
     {
240
-        $rtn    = $this->data['severity'];
240
+        $rtn = $this->data['severity'];
241 241
 
242 242
         return $rtn;
243 243
     }
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     */
250 250
     public function getMessage()
251 251
     {
252
-        $rtn    = $this->data['message'];
252
+        $rtn = $this->data['message'];
253 253
 
254 254
         return $rtn;
255 255
     }
@@ -261,10 +261,10 @@  discard block
 block discarded – undo
261 261
     */
262 262
     public function getCreatedDate()
263 263
     {
264
-        $rtn    = $this->data['created_date'];
264
+        $rtn = $this->data['created_date'];
265 265
 
266 266
         if (!empty($rtn)) {
267
-            $rtn    = new \DateTime($rtn);
267
+            $rtn = new \DateTime($rtn);
268 268
         }
269 269
         
270 270
         return $rtn;
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
             return null;
460 460
         }
461 461
 
462
-        $cacheKey   = 'Cache.Build.' . $key;
462
+        $cacheKey   = 'Cache.Build.'.$key;
463 463
         $rtn        = $this->cache->get($cacheKey, null);
464 464
 
465 465
         if (empty($rtn)) {
Please login to merge, or discard this patch.
PHPCI/Model/Build.php 3 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,6 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
     /**
76 76
      * Store build metadata
77
+     * @param string $key
77 78
      */
78 79
     public function storeMeta($key, $value)
79 80
     {
@@ -181,7 +182,7 @@  discard block
 block discarded – undo
181 182
 
182 183
     /**
183 184
      * Return a value from the build's "extra" JSON array.
184
-     * @param null $key
185
+     * @param string $key
185 186
      * @return mixed|null|string
186 187
      */
187 188
     public function getExtra($key = null)
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 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
- * @link         https://www.phptesting.org/
8
- */
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
+     * @link         https://www.phptesting.org/
8
+     */
9 9
 
10 10
 namespace PHPCI\Model;
11 11
 
@@ -31,16 +31,16 @@  discard block
 block discarded – undo
31 31
     public $currentBuildPath;
32 32
 
33 33
     /**
34
-    * Get link to commit from another source (i.e. Github)
35
-    */
34
+     * Get link to commit from another source (i.e. Github)
35
+     */
36 36
     public function getCommitLink()
37 37
     {
38 38
         return '#';
39 39
     }
40 40
 
41 41
     /**
42
-    * Get link to branch from another source (i.e. Github)
43
-    */
42
+     * Get link to branch from another source (i.e. Github)
43
+     */
44 44
     public function getBranchLink()
45 45
     {
46 46
         return '#';
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
     }
57 57
 
58 58
     /**
59
-    * Send status updates to any relevant third parties (i.e. Github)
60
-    */
59
+     * Send status updates to any relevant third parties (i.e. Github)
60
+     */
61 61
     public function sendStatusPostback()
62 62
     {
63 63
         return;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
         }
106 106
 
107 107
         // Try .phpci.yml
108
-        if (is_file($buildPath . '/.phpci.yml')) {
109
-            $build_config = file_get_contents($buildPath . '/.phpci.yml');
108
+        if (is_file($buildPath.'/.phpci.yml')) {
109
+            $build_config = file_get_contents($buildPath.'/.phpci.yml');
110 110
         }
111 111
 
112 112
         // Try phpci.yml first:
113
-        if (empty($build_config) && is_file($buildPath . '/phpci.yml')) {
114
-            $build_config = file_get_contents($buildPath . '/phpci.yml');
113
+        if (empty($build_config) && is_file($buildPath.'/phpci.yml')) {
114
+            $build_config = file_get_contents($buildPath.'/phpci.yml');
115 115
         }
116 116
 
117 117
         // Fall back to zero config plugins:
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      */
136 136
     protected function getZeroConfigPlugins(Builder $builder)
137 137
     {
138
-        $pluginDir = PHPCI_DIR . 'PHPCI/Plugin/';
138
+        $pluginDir = PHPCI_DIR.'PHPCI/Plugin/';
139 139
         $dir = new \DirectoryIterator($pluginDir);
140 140
 
141 141
         $config = array(
@@ -257,8 +257,8 @@  discard block
 block discarded – undo
257 257
         }
258 258
 
259 259
         if (empty($this->currentBuildPath)) {
260
-            $buildDirectory = $this->getId() . '_' . substr(md5(microtime(true)), 0, 5);
261
-            $this->currentBuildPath = PHPCI_BUILD_ROOT_DIR . $buildDirectory . DIRECTORY_SEPARATOR;
260
+            $buildDirectory = $this->getId().'_'.substr(md5(microtime(true)), 0, 5);
261
+            $this->currentBuildPath = PHPCI_BUILD_ROOT_DIR.$buildDirectory.DIRECTORY_SEPARATOR;
262 262
         }
263 263
 
264 264
         return $this->currentBuildPath;
Please login to merge, or discard this patch.
PHPCI/Model/Build/SubversionBuild.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
     /**
158 158
      * Create an SSH wrapper script for Svn to use, to disable host key checking, etc.
159 159
      * @param $cloneTo
160
-     * @param $keyFile
160
+     * @param string $keyFile
161 161
      * @return string
162 162
      */
163 163
     protected function writeSshWrapper($cloneTo, $keyFile)
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         if (empty($branch) || $branch == 'trunk') {
39 39
             $url .= 'trunk';
40 40
         } else {
41
-            $url .= 'branches/' . $branch;
41
+            $url .= 'branches/'.$branch;
42 42
         }
43 43
 
44 44
         return $url;
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $depth = $builder->getConfig('clone_depth');
64 64
 
65 65
         if (!is_null($depth)) {
66
-            $cmd .= ' --depth ' . intval($depth) . ' ';
66
+            $cmd .= ' --depth '.intval($depth).' ';
67 67
         }
68 68
 
69 69
         $this->svnCommand = $cmd;
@@ -117,12 +117,12 @@  discard block
 block discarded – undo
117 117
      */
118 118
     protected function cloneBySsh(Builder $builder, $cloneTo)
119 119
     {
120
-        $cmd = $this->svnCommand . ' %s "%s"';
120
+        $cmd = $this->svnCommand.' %s "%s"';
121 121
 
122 122
         if (!IS_WIN) {
123 123
             $keyFile    = $this->writeSshKey($cloneTo);
124 124
             $sshWrapper = $this->writeSshWrapper($cloneTo, $keyFile);
125
-            $cmd        = 'export SVN_SSH="' . $sshWrapper . '" && ' . $cmd;
125
+            $cmd        = 'export SVN_SSH="'.$sshWrapper.'" && '.$cmd;
126 126
         }
127 127
 
128 128
         $success = $builder->executeCommand($cmd, $this->getCloneUrl(), $cloneTo);
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
      */
144 144
     protected function writeSshKey($cloneTo)
145 145
     {
146
-        $keyPath = dirname($cloneTo . '/temp');
147
-        $keyFile = $keyPath . '.key';
146
+        $keyPath = dirname($cloneTo.'/temp');
147
+        $keyFile = $keyPath.'.key';
148 148
 
149 149
         // Write the contents of this project's svn key to the file:
150 150
         file_put_contents($keyFile, $this->getProject()->getSshPrivateKey());
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
      */
163 163
     protected function writeSshWrapper($cloneTo, $keyFile)
164 164
     {
165
-        $path        = dirname($cloneTo . '/temp');
166
-        $wrapperFile = $path . '.sh';
165
+        $path        = dirname($cloneTo.'/temp');
166
+        $wrapperFile = $path.'.sh';
167 167
 
168 168
         $sshFlags = '-o CheckHostIP=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o PasswordAuthentication=no';
169 169
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 OUT;
176 176
 
177 177
         file_put_contents($wrapperFile, $script);
178
-        shell_exec('chmod +x "' . $wrapperFile . '"');
178
+        shell_exec('chmod +x "'.$wrapperFile.'"');
179 179
 
180 180
         return $wrapperFile;
181 181
     }
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 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
- * @link         https://www.phptesting.org/
8
- */
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
+     * @link         https://www.phptesting.org/
8
+     */
9 9
 
10 10
 namespace PHPCI\Service;
11 11
 
Please login to merge, or discard this patch.
PHPCI/Plugin/Campfire.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
 
115 115
     /**
116 116
      * Make a request to Campfire.
117
-     * @param $page
117
+     * @param string $page
118 118
      * @param null $data
119 119
      * @return bool|mixed
120 120
      */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function execute()
65 65
     {
66
-        $url = PHPCI_URL . "build/view/" . $this->build->getId();
66
+        $url = PHPCI_URL."build/view/".$this->build->getId();
67 67
         $message = str_replace("%buildurl%", $url, $this->message);
68 68
         $this->joinRoom($this->roomId);
69 69
         $status = $this->speak($message, $this->roomId);
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      */
121 121
     private function getPageByPost($page, $data = null)
122 122
     {
123
-        $url = $this->url . $page;
123
+        $url = $this->url.$page;
124 124
         // The new API allows JSON, so we can pass
125 125
         // PHP data structures instead of old school POST
126 126
         $json = json_encode($data);
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         curl_setopt($handle, CURLOPT_USERAGENT, $this->userAgent);
134 134
         curl_setopt($handle, CURLOPT_VERBOSE, $this->verbose);
135 135
         curl_setopt($handle, CURLOPT_FOLLOWLOCATION, 1);
136
-        curl_setopt($handle, CURLOPT_USERPWD, $this->authToken . ':x');
136
+        curl_setopt($handle, CURLOPT_USERPWD, $this->authToken.':x');
137 137
         curl_setopt($handle, CURLOPT_HTTPHEADER, array("Content-type: application/json"));
138 138
         curl_setopt($handle, CURLOPT_COOKIEFILE, $this->cookie);
139 139
 
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 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
- * @link         https://www.phptesting.org/
8
- */
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
+     * @link         https://www.phptesting.org/
8
+     */
9 9
 
10 10
 namespace PHPCI\Service;
11 11
 
Please login to merge, or discard this patch.
PHPCI/Plugin/Codeception.php 4 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
     /**
59 59
      * Try and find the codeception YML config file.
60
-     * @param $buildPath
60
+     * @param string $buildPath
61 61
      * @return null|string
62 62
      */
63 63
     public static function findConfigFile($buildPath)
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
 
114 114
     /**
115 115
      * Run tests from a Codeception config file.
116
-     * @param $configPath
117
-     * @return bool|mixed
116
+     * @param string $configPath
117
+     * @return boolean
118 118
      * @throws \Exception
119 119
      */
120 120
     protected function runConfigFile($configPath)
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
13 13
 use PHPCI\Helper\Lang;
14 14
 use PHPCI\Model\Build;
15 15
 use PHPCI\Plugin\Util\TestResultParsers\Codeception as Parser;
16
-use Psr\Log\LogLevel;
17 16
 
18 17
 /**
19 18
  * Codeception Plugin - Enables full acceptance, unit, and functional testing.
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -62,11 +62,11 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public static function findConfigFile($buildPath)
64 64
     {
65
-        if (file_exists($buildPath . 'codeception.yml')) {
65
+        if (file_exists($buildPath.'codeception.yml')) {
66 66
             return 'codeception.yml';
67 67
         }
68 68
 
69
-        if (file_exists($buildPath . 'codeception.dist.yml')) {
69
+        if (file_exists($buildPath.'codeception.dist.yml')) {
70 70
             return 'codeception.dist.yml';
71 71
         }
72 72
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     {
84 84
         $this->phpci = $phpci;
85 85
         $this->build = $build;
86
-        $this->path = 'tests' . DIRECTORY_SEPARATOR . '_output' . DIRECTORY_SEPARATOR;
86
+        $this->path = 'tests'.DIRECTORY_SEPARATOR.'_output'.DIRECTORY_SEPARATOR;
87 87
 
88 88
         if (empty($options['config'])) {
89 89
             $this->ymlConfigFile = self::findConfigFile($this->phpci->buildPath);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             $this->ymlConfigFile = $options['config'];
92 92
         }
93 93
         if (isset($options['args'])) {
94
-            $this->args = (string) $options['args'];
94
+            $this->args = (string)$options['args'];
95 95
         }
96 96
         if (isset($options['path'])) {
97 97
             $this->path = $options['path'];
@@ -129,21 +129,21 @@  discard block
 block discarded – undo
129 129
             return false;
130 130
         }
131 131
 
132
-        $cmd = 'cd "%s" && ' . $codecept . ' run -c "%s" --xml ' . $this->args;
132
+        $cmd = 'cd "%s" && '.$codecept.' run -c "%s" --xml '.$this->args;
133 133
 
134 134
         if (IS_WIN) {
135
-            $cmd = 'cd /d "%s" && ' . $codecept . ' run -c "%s" --xml ' . $this->args;
135
+            $cmd = 'cd /d "%s" && '.$codecept.' run -c "%s" --xml '.$this->args;
136 136
         }
137 137
 
138
-        $configPath = $this->phpci->buildPath . $configPath;
138
+        $configPath = $this->phpci->buildPath.$configPath;
139 139
         $success = $this->phpci->executeCommand($cmd, $this->phpci->buildPath, $configPath);
140 140
 
141 141
         $this->phpci->log(
142
-            'Codeception XML path: '. $this->phpci->buildPath . $this->path . 'report.xml',
142
+            'Codeception XML path: '.$this->phpci->buildPath.$this->path.'report.xml',
143 143
             Loglevel::DEBUG
144 144
         );
145 145
 
146
-        $xml = file_get_contents($this->phpci->buildPath . $this->path . 'report.xml', false);
146
+        $xml = file_get_contents($this->phpci->buildPath.$this->path.'report.xml', false);
147 147
         $parser = new Parser($this->phpci, $xml);
148 148
         $output = $parser->parse();
149 149
 
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 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
- * @link         https://www.phptesting.org/
8
- */
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
+     * @link         https://www.phptesting.org/
8
+     */
9 9
 
10 10
 namespace PHPCI\Service;
11 11
 
Please login to merge, or discard this patch.
PHPCI/Plugin/Email.php 4 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,6 @@
 block discarded – undo
44 44
      * Set up the plugin, configure options, etc.
45 45
      * @param Builder $phpci
46 46
      * @param Build $build
47
-     * @param \Swift_Mailer $mailer
48 47
      * @param array $options
49 48
      */
50 49
     public function __construct(
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     protected function getMailTemplate()
208 208
     {
209 209
         if (isset($this->options['template'])) {
210
-            return new View('Email/' . $this->options['template']);
210
+            return new View('Email/'.$this->options['template']);
211 211
         }
212 212
 
213 213
         return $this->getDefaultMailTemplate();
@@ -222,6 +222,6 @@  discard block
 block discarded – undo
222 222
     {
223 223
         $template = $this->build->isSuccessful() ? 'short' : 'long';
224 224
 
225
-        return new View('Email/' . $template);
225
+        return new View('Email/'.$template);
226 226
     }
227 227
 }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
 namespace PHPCI\Plugin;
11 11
 
12 12
 use PHPCI\Builder;
13
-use PHPCI\Helper\Lang;
14 13
 use PHPCI\Model\Build;
15 14
 
16 15
 /**
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 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
- * @link         https://www.phptesting.org/
8
- */
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
+     * @link         https://www.phptesting.org/
8
+     */
9 9
 
10 10
 namespace PHPCI\Service;
11 11
 
Please login to merge, or discard this patch.
PHPCI/Plugin/Irc.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
 
95 95
     /**
96 96
      * @param resource $socket
97
-     * @param array $commands
98
-     * @return bool
97
+     * @param string[] $commands
98
+     * @return boolean|null
99 99
      */
100 100
     private function executeIrcCommands($socket, array $commands)
101 101
     {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      *
124 124
      * @param resource $socket
125 125
      * @param string $command
126
-     * @return bool
126
+     * @return boolean|null
127 127
      */
128 128
     private function executeIrcCommand($socket, $command)
129 129
     {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -80,12 +80,12 @@  discard block
 block discarded – undo
80 80
         stream_set_timeout($sock, 1);
81 81
 
82 82
         $connectCommands = array(
83
-            'USER ' . $this->nick . ' 0 * :' . $this->nick,
84
-            'NICK ' . $this->nick,
83
+            'USER '.$this->nick.' 0 * :'.$this->nick,
84
+            'NICK '.$this->nick,
85 85
         );
86 86
         $this->executeIrcCommands($sock, $connectCommands);
87
-        $this->executeIrcCommand($sock, 'JOIN ' . $this->room);
88
-        $this->executeIrcCommand($sock, 'PRIVMSG ' . $this->room . ' :' . $msg);
87
+        $this->executeIrcCommand($sock, 'JOIN '.$this->room);
88
+        $this->executeIrcCommand($sock, 'PRIVMSG '.$this->room.' :'.$msg);
89 89
 
90 90
         fclose($sock);
91 91
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     private function executeIrcCommands($socket, array $commands)
101 101
     {
102 102
         foreach ($commands as $command) {
103
-            fputs($socket, $command . "\n");
103
+            fputs($socket, $command."\n");
104 104
         }
105 105
 
106 106
         $pingBack = false;
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         }
115 115
 
116 116
         if ($pingBack) {
117
-            $command = 'PONG :' . $pingBack . "\n";
117
+            $command = 'PONG :'.$pingBack."\n";
118 118
             fputs($socket, $command);
119 119
         }
120 120
     }
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 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
- * @link         https://www.phptesting.org/
8
- */
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
+     * @link         https://www.phptesting.org/
8
+     */
9 9
 
10 10
 namespace PHPCI\Service;
11 11
 
Please login to merge, or discard this patch.
PHPCI/Plugin/PhpCodeSniffer.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@
 block discarded – undo
185 185
 
186 186
     /**
187 187
      * Process options and produce an arguments string for PHPCS.
188
-     * @return array
188
+     * @return string[]
189 189
      */
190 190
     protected function getFlags()
191 191
     {
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 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
- * @link         https://www.phptesting.org/
8
- */
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
+     * @link         https://www.phptesting.org/
8
+     */
9 9
 
10 10
 namespace PHPCI\Plugin;
11 11
 
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
     }
143 143
 
144 144
     /**
145
-    * Runs PHP Code Sniffer in a specified directory, to a specified standard.
146
-    */
145
+     * Runs PHP Code Sniffer in a specified directory, to a specified standard.
146
+     */
147 147
     public function execute()
148 148
     {
149 149
         list($ignore, $standard, $suffixes) = $this->getFlags();
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         }
123 123
 
124 124
         if (!empty($options['encoding'])) {
125
-            $this->encoding = ' --encoding=' . $options['encoding'];
125
+            $this->encoding = ' --encoding='.$options['encoding'];
126 126
         }
127 127
 
128 128
         $this->setOptions($options);
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 
153 153
         $this->phpci->logExecOutput(false);
154 154
 
155
-        $cmd = $phpcs . ' --report=json %s %s %s %s %s "%s"';
155
+        $cmd = $phpcs.' --report=json %s %s %s %s %s "%s"';
156 156
         $this->phpci->executeCommand(
157 157
             $cmd,
158 158
             $standard,
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
             $ignore,
161 161
             $this->tab_width,
162 162
             $this->encoding,
163
-            $this->phpci->buildPath . $this->path
163
+            $this->phpci->buildPath.$this->path
164 164
         );
165 165
 
166 166
         $output = $this->phpci->getLastOutput();
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     {
192 192
         $ignore = '';
193 193
         if (count($this->ignore)) {
194
-            $ignore = ' --ignore=' . implode(',', $this->ignore);
194
+            $ignore = ' --ignore='.implode(',', $this->ignore);
195 195
         }
196 196
 
197 197
         if (strpos($this->standard, '/') !== false) {
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
         $suffixes = '';
204 204
         if (count($this->suffixes)) {
205
-            $suffixes = ' --extensions=' . implode(',', $this->suffixes);
205
+            $suffixes = ' --extensions='.implode(',', $this->suffixes);
206 206
         }
207 207
 
208 208
         return array($ignore, $standard, $suffixes);
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
                 $this->build->reportError(
234 234
                     $this->phpci,
235 235
                     'php_code_sniffer',
236
-                    'PHPCS: ' . $message['message'],
236
+                    'PHPCS: '.$message['message'],
237 237
                     $message['type'] == 'ERROR' ? BuildError::SEVERITY_HIGH : BuildError::SEVERITY_LOW,
238 238
                     $fileName,
239 239
                     $message['line']
Please login to merge, or discard this patch.
PHPCI/Plugin/PhpCpd.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,8 +108,8 @@
 block discarded – undo
108 108
 
109 109
     /**
110 110
      * Process the PHPCPD XML report.
111
-     * @param $xmlString
112
-     * @return array
111
+     * @param string $xmlString
112
+     * @return integer
113 113
      * @throws \Exception
114 114
      */
115 115
     protected function processReport($xmlString)
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 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
- * @link         https://www.phptesting.org/
8
- */
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
+     * @link         https://www.phptesting.org/
8
+     */
9 9
 
10 10
 namespace PHPCI\Plugin;
11 11
 
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
     }
68 68
 
69 69
     /**
70
-    * Runs PHP Copy/Paste Detector in a specified directory.
71
-    */
70
+     * Runs PHP Copy/Paste Detector in a specified directory.
71
+     */
72 72
     public function execute()
73 73
     {
74 74
         $ignore = '';
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $this->ignore = $phpci->ignore;
55 55
 
56 56
         if (!empty($options['path'])) {
57
-            $this->path = $phpci->buildPath . $options['path'];
57
+            $this->path = $phpci->buildPath.$options['path'];
58 58
         }
59 59
 
60 60
         if (!empty($options['standard'])) {
@@ -73,14 +73,14 @@  discard block
 block discarded – undo
73 73
     {
74 74
         $ignore = '';
75 75
         if (count($this->ignore)) {
76
-            $map = function ($item) {
76
+            $map = function($item) {
77 77
                 // remove the trailing slash
78 78
                 $item = rtrim($item, DIRECTORY_SEPARATOR);
79 79
 
80
-                if (is_file(rtrim($this->path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $item)) {
81
-                    return ' --names-exclude ' . $item;
80
+                if (is_file(rtrim($this->path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$item)) {
81
+                    return ' --names-exclude '.$item;
82 82
                 } else {
83
-                    return ' --exclude ' . $item;
83
+                    return ' --exclude '.$item;
84 84
                 }
85 85
 
86 86
             };
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
         $tmpfilename = tempnam('/tmp', 'phpcpd');
95 95
 
96
-        $cmd = $phpcpd . ' --log-pmd "%s" %s "%s"';
96
+        $cmd = $phpcpd.' --log-pmd "%s" %s "%s"';
97 97
         $success = $this->phpci->executeCommand($cmd, $tmpfilename, $ignore, $this->path);
98 98
 
99 99
         print $this->phpci->getLastOutput();
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                     BuildError::SEVERITY_NORMAL,
143 143
                     $fileName,
144 144
                     $file['line'],
145
-                    (int) $file['line'] + (int) $duplication['lines']
145
+                    (int)$file['line'] + (int)$duplication['lines']
146 146
                 );
147 147
             }
148 148
 
Please login to merge, or discard this patch.