Test Setup Failed
Push — develop ( 4d8ae2...dad829 )
by Àlex
07:22
created
PHPCI/Controller/PluginController.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
 
37 37
         $pluginInfo = new PluginInformationCollection();
38 38
         $pluginInfo->add(FilesPluginInformation::newFromDir(
39
-            PHPCI_DIR . "PHPCI/Plugin/"
39
+            PHPCI_DIR."PHPCI/Plugin/"
40 40
         ));
41 41
         $pluginInfo->add(ComposerPluginInformation::buildFromYaml(
42
-            PHPCI_DIR . "vendor/composer/installed.json"
42
+            PHPCI_DIR."vendor/composer/installed.json"
43 43
         ));
44 44
 
45 45
         $this->view->plugins = $pluginInfo->getInstalledPlugins();
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     protected function getComposerJson()
57 57
     {
58
-        $json = file_get_contents(APPLICATION_PATH . 'composer.json');
58
+        $json = file_get_contents(APPLICATION_PATH.'composer.json');
59 59
         return json_decode($json, true);
60 60
     }
61 61
 }
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/Controller/GroupController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
 
86 86
         $form = new Form();
87 87
         $form->setMethod('POST');
88
-        $form->setAction(PHPCI_URL . 'group/edit' . (!is_null($groupId) ? '/' . $groupId : ''));
88
+        $form->setAction(PHPCI_URL.'group/edit'.(!is_null($groupId) ? '/'.$groupId : ''));
89 89
 
90 90
         $title = new Form\Element\Text('title');
91 91
         $title->setContainerClass('form-group');
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 2015, 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 2015, 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\Command;
11 11
 
Please login to merge, or discard this patch.
PHPCI/Controller/SettingsController.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
         $response = new b8\Http\Response\RedirectResponse();
106 106
 
107 107
         if ($error) {
108
-            $response->setHeader('Location', PHPCI_URL . 'settings?saved=2');
108
+            $response->setHeader('Location', PHPCI_URL.'settings?saved=2');
109 109
         } else {
110
-            $response->setHeader('Location', PHPCI_URL . 'settings?saved=1');
110
+            $response->setHeader('Location', PHPCI_URL.'settings?saved=1');
111 111
         }
112 112
 
113 113
         return $response;
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
         $response = new b8\Http\Response\RedirectResponse();
129 129
 
130 130
         if ($error) {
131
-            $response->setHeader('Location', PHPCI_URL . 'settings?saved=2');
131
+            $response->setHeader('Location', PHPCI_URL.'settings?saved=2');
132 132
         } else {
133
-            $response->setHeader('Location', PHPCI_URL . 'settings?saved=1');
133
+            $response->setHeader('Location', PHPCI_URL.'settings?saved=1');
134 134
         }
135 135
 
136 136
         return $response;
@@ -150,9 +150,9 @@  discard block
 block discarded – undo
150 150
         $response = new b8\Http\Response\RedirectResponse();
151 151
 
152 152
         if ($error) {
153
-            $response->setHeader('Location', PHPCI_URL . 'settings?saved=2');
153
+            $response->setHeader('Location', PHPCI_URL.'settings?saved=2');
154 154
         } else {
155
-            $response->setHeader('Location', PHPCI_URL . 'settings?saved=1');
155
+            $response->setHeader('Location', PHPCI_URL.'settings?saved=1');
156 156
         }
157 157
 
158 158
         return $response;
@@ -171,9 +171,9 @@  discard block
 block discarded – undo
171 171
         $response = new b8\Http\Response\RedirectResponse();
172 172
 
173 173
         if ($error) {
174
-            $response->setHeader('Location', PHPCI_URL . 'settings?saved=2');
174
+            $response->setHeader('Location', PHPCI_URL.'settings?saved=2');
175 175
         } else {
176
-            $response->setHeader('Location', PHPCI_URL . 'settings?saved=1');
176
+            $response->setHeader('Location', PHPCI_URL.'settings?saved=1');
177 177
         }
178 178
 
179 179
         return $response;
@@ -194,9 +194,9 @@  discard block
 block discarded – undo
194 194
         $response = new b8\Http\Response\RedirectResponse();
195 195
 
196 196
         if ($error) {
197
-            $response->setHeader('Location', PHPCI_URL . 'settings?saved=2');
197
+            $response->setHeader('Location', PHPCI_URL.'settings?saved=2');
198 198
         } else {
199
-            $response->setHeader('Location', PHPCI_URL . 'settings?saved=1');
199
+            $response->setHeader('Location', PHPCI_URL.'settings?saved=1');
200 200
         }
201 201
 
202 202
         return $response;
@@ -223,13 +223,13 @@  discard block
 block discarded – undo
223 223
                 $this->storeSettings();
224 224
 
225 225
                 $response = new b8\Http\Response\RedirectResponse();
226
-                $response->setHeader('Location', PHPCI_URL . 'settings?linked=1');
226
+                $response->setHeader('Location', PHPCI_URL.'settings?linked=1');
227 227
                 return $response;
228 228
             }
229 229
         }
230 230
 
231 231
         $response = new b8\Http\Response\RedirectResponse();
232
-        $response->setHeader('Location', PHPCI_URL . 'settings?linked=2');
232
+        $response->setHeader('Location', PHPCI_URL.'settings?linked=2');
233 233
         return $response;
234 234
     }
235 235
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
     {
259 259
         $form = new Form();
260 260
         $form->setMethod('POST');
261
-        $form->setAction(PHPCI_URL . 'settings/github');
261
+        $form->setAction(PHPCI_URL.'settings/github');
262 262
         $form->addField(new Form\Element\Csrf('csrf'));
263 263
 
264 264
         $field = new Form\Element\Text('githubid');
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
     {
303 303
         $form = new Form();
304 304
         $form->setMethod('POST');
305
-        $form->setAction(PHPCI_URL . 'settings/email');
305
+        $form->setAction(PHPCI_URL.'settings/email');
306 306
         $form->addField(new Form\Element\Csrf('csrf'));
307 307
 
308 308
         $field = new Form\Element\Text('smtp_address');
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
     {
400 400
         $form = new Form();
401 401
         $form->setMethod('POST');
402
-        $form->setAction(PHPCI_URL . 'settings/build');
402
+        $form->setAction(PHPCI_URL.'settings/build');
403 403
 
404 404
         $field = new Form\Element\Select('failed_after');
405 405
         $field->setRequired(false);
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
     {
437 437
         $form = new Form();
438 438
         $form->setMethod('POST');
439
-        $form->setAction(PHPCI_URL . 'settings/basic');
439
+        $form->setAction(PHPCI_URL.'settings/basic');
440 440
 
441 441
         $field = new Form\Element\Select('language');
442 442
         $field->setRequired(true);
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
     {
469 469
         $form = new Form();
470 470
         $form->setMethod('POST');
471
-        $form->setAction(PHPCI_URL . 'settings/authentication');
471
+        $form->setAction(PHPCI_URL.'settings/authentication');
472 472
         $form->addField(new Form\Element\Csrf('csrf'));
473 473
 
474 474
         $field = new Form\Element\Checkbox('disable_authentication');
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/Controller/UserController.php 2 patches
Indentation   +16 added lines, -16 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\Controller;
11 11
 
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
     }
45 45
 
46 46
     /**
47
-    * View user list.
48
-    */
47
+     * View user list.
48
+     */
49 49
     public function index()
50 50
     {
51 51
         $users          = $this->userStore->getWhere(array(), 1000, 0, array(), array('email' => 'ASC'));
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
     }
140 140
 
141 141
     /**
142
-    * Add a user - handles both form and processing.
143
-    */
142
+     * Add a user - handles both form and processing.
143
+     */
144 144
     public function add()
145 145
     {
146 146
         $this->requireAdmin();
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
     }
181 181
 
182 182
     /**
183
-    * Edit a user - handles both form and processing.
184
-    */
183
+     * Edit a user - handles both form and processing.
184
+     */
185 185
     public function edit($userId)
186 186
     {
187 187
         $this->requireAdmin();
@@ -221,8 +221,8 @@  discard block
 block discarded – undo
221 221
     }
222 222
 
223 223
     /**
224
-    * Create user add / edit form.
225
-    */
224
+     * Create user add / edit form.
225
+     */
226 226
     protected function userForm($values, $type = 'add')
227 227
     {
228 228
         $form = new Form();
@@ -275,8 +275,8 @@  discard block
 block discarded – undo
275 275
     }
276 276
 
277 277
     /**
278
-    * Delete a user.
279
-    */
278
+     * Delete a user.
279
+     */
280 280
     public function delete($userId)
281 281
     {
282 282
         $this->requireAdmin();
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
     */
49 49
     public function index()
50 50
     {
51
-        $users          = $this->userStore->getWhere(array(), 1000, 0, array(), array('email' => 'ASC'));
52
-        $this->view->users    = $users;
51
+        $users = $this->userStore->getWhere(array(), 1000, 0, array(), array('email' => 'ASC'));
52
+        $this->view->users = $users;
53 53
 
54 54
         $this->layout->title = Lang::get('manage_users');
55 55
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
             $values = array();
156 156
         }
157 157
 
158
-        $form   = $this->userForm($values);
158
+        $form = $this->userForm($values);
159 159
 
160 160
         if ($method != 'POST' || ($method == 'POST' && !$form->validate())) {
161 161
             $view           = new b8\View('UserForm');
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         $this->userService->createUser($name, $email, $password, $isAdmin);
176 176
 
177 177
         $response = new b8\Http\Response\RedirectResponse();
178
-        $response->setHeader('Location', PHPCI_URL . 'user');
178
+        $response->setHeader('Location', PHPCI_URL.'user');
179 179
         return $response;
180 180
     }
181 181
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         $this->layout->subtitle = Lang::get('edit_user');
198 198
 
199 199
         $values = array_merge($user->getDataArray(), $this->getParams());
200
-        $form = $this->userForm($values, 'edit/' . $userId);
200
+        $form = $this->userForm($values, 'edit/'.$userId);
201 201
 
202 202
         if ($method != 'POST' || ($method == 'POST' && !$form->validate())) {
203 203
             $view = new b8\View('UserForm');
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         $this->userService->updateUser($user, $name, $email, $password, $isAdmin);
217 217
 
218 218
         $response = new b8\Http\Response\RedirectResponse();
219
-        $response->setHeader('Location', PHPCI_URL . 'user');
219
+        $response->setHeader('Location', PHPCI_URL.'user');
220 220
         return $response;
221 221
     }
222 222
 
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
     {
228 228
         $form = new Form();
229 229
         $form->setMethod('POST');
230
-        $form->setAction(PHPCI_URL.'user/' . $type);
230
+        $form->setAction(PHPCI_URL.'user/'.$type);
231 231
         $form->addField(new Form\Element\Csrf('csrf'));
232 232
 
233 233
         $field = new Form\Element\Email('email');
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
     {
282 282
         $this->requireAdmin();
283 283
 
284
-        $user   = $this->userStore->getById($userId);
284
+        $user = $this->userStore->getById($userId);
285 285
 
286 286
         if (empty($user)) {
287 287
             throw new NotFoundException(Lang::get('user_n_not_found', $userId));
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
         $this->userService->deleteUser($user);
291 291
 
292 292
         $response = new b8\Http\Response\RedirectResponse();
293
-        $response->setHeader('Location', PHPCI_URL . 'user');
293
+        $response->setHeader('Location', PHPCI_URL.'user');
294 294
         return $response;
295 295
     }
296 296
 }
Please login to merge, or discard this patch.
PHPCI/BuildFactory.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@
 block discarded – undo
35 35
     }
36 36
 
37 37
     /**
38
-    * Takes a generic build and returns a type-specific build model.
39
-    * @param Build $build The build from which to get a more specific build type.
40
-    * @return Build
41
-    */
38
+     * Takes a generic build and returns a type-specific build model.
39
+     * @param Build $build The build from which to get a more specific build type.
40
+     * @return Build
41
+     */
42 42
     public static function getBuild(Build $build)
43 43
     {
44 44
         $project = $build->getProject();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         $build = Factory::getStore('Build')->getById($buildId);
29 29
 
30 30
         if (empty($build)) {
31
-            throw new \Exception('Build ID ' . $buildId . ' does not exist.');
31
+            throw new \Exception('Build ID '.$buildId.' does not exist.');
32 32
         }
33 33
 
34 34
         return self::getBuild($build);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                     return $build;
71 71
             }
72 72
 
73
-            $class = '\\PHPCI\\Model\\Build\\' . $type;
73
+            $class = '\\PHPCI\\Model\\Build\\'.$type;
74 74
             $build = new $class($build->getDataArray());
75 75
         }
76 76
 
Please login to merge, or discard this patch.
PHPCI/Model/Project.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     public function getLatestBuild($branch = 'master', $status = null)
32 32
     {
33
-        $criteria       = array('branch' => $branch, 'project_id' => $this->getId());
33
+        $criteria = array('branch' => $branch, 'project_id' => $this->getId());
34 34
 
35 35
         if (isset($status)) {
36 36
             $criteria['status'] = $status;
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/Model/Build/RemoteGitBuild.php 3 patches
Indentation   +14 added lines, -14 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\Build;
11 11
 
@@ -21,16 +21,16 @@  discard block
 block discarded – undo
21 21
 class RemoteGitBuild extends Build
22 22
 {
23 23
     /**
24
-    * Get the URL to be used to clone this remote repository.
25
-    */
24
+     * Get the URL to be used to clone this remote repository.
25
+     */
26 26
     protected function getCloneUrl()
27 27
     {
28 28
         return $this->getProject()->getReference();
29 29
     }
30 30
 
31 31
     /**
32
-    * Create a working copy by cloning, copying, or similar.
33
-    */
32
+     * Create a working copy by cloning, copying, or similar.
33
+     */
34 34
     public function createWorkingCopy(Builder $builder, $buildPath)
35 35
     {
36 36
         $key = trim($this->getProject()->getSshPrivateKey());
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
     }
51 51
 
52 52
     /**
53
-    * Use an HTTP-based git clone.
54
-    */
53
+     * Use an HTTP-based git clone.
54
+     */
55 55
     protected function cloneByHttp(Builder $builder, $cloneTo)
56 56
     {
57 57
         $cmd = 'git clone --recursive ';
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
     }
74 74
 
75 75
     /**
76
-    * Use an SSH-based git clone.
77
-    */
76
+     * Use an SSH-based git clone.
77
+     */
78 78
     protected function cloneBySsh(Builder $builder, $cloneTo)
79 79
     {
80 80
         $keyFile = $this->writeSshKey($cloneTo);
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $depth = $builder->getConfig('clone_depth');
60 60
 
61 61
         if (!is_null($depth)) {
62
-            $cmd .= ' --depth ' . intval($depth) . ' ';
62
+            $cmd .= ' --depth '.intval($depth).' ';
63 63
         }
64 64
 
65 65
         $cmd .= ' -b %s %s "%s"';
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
         $depth = $builder->getConfig('clone_depth');
90 90
 
91 91
         if (!is_null($depth)) {
92
-            $cmd .= ' --depth ' . intval($depth) . ' ';
92
+            $cmd .= ' --depth '.intval($depth).' ';
93 93
         }
94 94
 
95 95
         $cmd .= ' -b %s %s "%s"';
96 96
 
97 97
         if (!IS_WIN) {
98
-            $cmd = 'export GIT_SSH="'.$gitSshWrapper.'" && ' . $cmd;
98
+            $cmd = 'export GIT_SSH="'.$gitSshWrapper.'" && '.$cmd;
99 99
         }
100 100
 
101 101
         $success = $builder->executeCommand($cmd, $this->getBranch(), $this->getCloneUrl(), $cloneTo);
@@ -127,12 +127,12 @@  discard block
 block discarded – undo
127 127
         $chdir = IS_WIN ? 'cd /d "%s"' : 'cd "%s"';
128 128
 
129 129
         if (!empty($commit) && $commit != 'Manual') {
130
-            $cmd = $chdir . ' && git checkout %s --quiet';
130
+            $cmd = $chdir.' && git checkout %s --quiet';
131 131
             $success = $builder->executeCommand($cmd, $cloneTo, $commit);
132 132
         }
133 133
 
134 134
         // Always update the commit hash with the actual HEAD hash
135
-        if ($builder->executeCommand($chdir . ' && git rev-parse HEAD', $cloneTo)) {
135
+        if ($builder->executeCommand($chdir.' && git rev-parse HEAD', $cloneTo)) {
136 136
             $this->setCommitId(trim($builder->getLastOutput()));
137 137
         }
138 138
 
@@ -146,8 +146,8 @@  discard block
 block discarded – undo
146 146
      */
147 147
     protected function writeSshKey($cloneTo)
148 148
     {
149
-        $keyPath = dirname($cloneTo . '/temp');
150
-        $keyFile = $keyPath . '.key';
149
+        $keyPath = dirname($cloneTo.'/temp');
150
+        $keyFile = $keyPath.'.key';
151 151
 
152 152
         // Write the contents of this project's git key to the file:
153 153
         file_put_contents($keyFile, $this->getProject()->getSshPrivateKey());
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
      */
166 166
     protected function writeSshWrapper($cloneTo, $keyFile)
167 167
     {
168
-        $path = dirname($cloneTo . '/temp');
169
-        $wrapperFile = $path . '.sh';
168
+        $path = dirname($cloneTo.'/temp');
169
+        $wrapperFile = $path.'.sh';
170 170
 
171 171
         $sshFlags = '-o CheckHostIP=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o PasswordAuthentication=no';
172 172
 
Please login to merge, or discard this patch.
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.
PHPCI/Model/Build/BitbucketBuild.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     */
26 26
     public function getCommitLink()
27 27
     {
28
-        return 'https://bitbucket.org/' . $this->getProject()->getReference() . '/commits/' . $this->getCommitId();
28
+        return 'https://bitbucket.org/'.$this->getProject()->getReference().'/commits/'.$this->getCommitId();
29 29
     }
30 30
 
31 31
     /**
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     */
34 34
     public function getBranchLink()
35 35
     {
36
-        return 'https://bitbucket.org/' . $this->getProject()->getReference() . '/src/?at=' . $this->getBranch();
36
+        return 'https://bitbucket.org/'.$this->getProject()->getReference().'/src/?at='.$this->getBranch();
37 37
     }
38 38
 
39 39
     /**
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
         $key = trim($this->getProject()->getSshPrivateKey());
45 45
 
46 46
         if (!empty($key)) {
47
-            return '[email protected]:' . $this->getProject()->getReference() . '.git';
47
+            return '[email protected]:'.$this->getProject()->getReference().'.git';
48 48
         } else {
49
-            return 'https://bitbucket.org/' . $this->getProject()->getReference() . '.git';
49
+            return 'https://bitbucket.org/'.$this->getProject()->getReference().'.git';
50 50
         }
51 51
     }
52 52
 }
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\Build;
11 11
 
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
 {
22 22
 
23 23
     /**
24
-    * Get link to commit from another source (i.e. Github)
25
-    */
24
+     * Get link to commit from another source (i.e. Github)
25
+     */
26 26
     public function getCommitLink()
27 27
     {
28 28
         $domain = $this->getProject()->getAccessInformation("domain");
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
     }
31 31
 
32 32
     /**
33
-    * Get link to branch from another source (i.e. Github)
34
-    */
33
+     * Get link to branch from another source (i.e. Github)
34
+     */
35 35
     public function getBranchLink()
36 36
     {
37 37
         $domain = $this->getProject()->getAccessInformation("domain");
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     }
53 53
 
54 54
     /**
55
-    * Get the URL to be used to clone this remote repository.
56
-    */
55
+     * Get the URL to be used to clone this remote repository.
56
+     */
57 57
     protected function getCloneUrl()
58 58
     {
59 59
         $key = trim($this->getProject()->getSshPrivateKey());
Please login to merge, or discard this patch.
PHPCI/Model/Build/GithubBuild.php 2 patches
Indentation   +14 added lines, -14 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\Build;
11 11
 
@@ -23,24 +23,24 @@  discard block
 block discarded – undo
23 23
 class GithubBuild extends RemoteGitBuild
24 24
 {
25 25
     /**
26
-    * Get link to commit from another source (i.e. Github)
27
-    */
26
+     * Get link to commit from another source (i.e. Github)
27
+     */
28 28
     public function getCommitLink()
29 29
     {
30 30
         return 'https://github.com/' . $this->getProject()->getReference() . '/commit/' . $this->getCommitId();
31 31
     }
32 32
 
33 33
     /**
34
-    * Get link to branch from another source (i.e. Github)
35
-    */
34
+     * Get link to branch from another source (i.e. Github)
35
+     */
36 36
     public function getBranchLink()
37 37
     {
38 38
         return 'https://github.com/' . $this->getProject()->getReference() . '/tree/' . $this->getBranch();
39 39
     }
40 40
 
41 41
     /**
42
-    * Send status updates to any relevant third parties (i.e. Github)
43
-    */
42
+     * Send status updates to any relevant third parties (i.e. Github)
43
+     */
44 44
     public function sendStatusPostback()
45 45
     {
46 46
         $token = \b8\Config::getInstance()->get('phpci.github.token');
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
     }
98 98
 
99 99
     /**
100
-    * Get the URL to be used to clone this remote repository.
101
-    */
100
+     * Get the URL to be used to clone this remote repository.
101
+     */
102 102
     protected function getCloneUrl()
103 103
     {
104 104
         $key = trim($this->getProject()->getSshPrivateKey());
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     */
28 28
     public function getCommitLink()
29 29
     {
30
-        return 'https://github.com/' . $this->getProject()->getReference() . '/commit/' . $this->getCommitId();
30
+        return 'https://github.com/'.$this->getProject()->getReference().'/commit/'.$this->getCommitId();
31 31
     }
32 32
 
33 33
     /**
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     */
36 36
     public function getBranchLink()
37 37
     {
38
-        return 'https://github.com/' . $this->getProject()->getReference() . '/tree/' . $this->getBranch();
38
+        return 'https://github.com/'.$this->getProject()->getReference().'/tree/'.$this->getBranch();
39 39
     }
40 40
 
41 41
     /**
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             return;
50 50
         }
51 51
 
52
-        $project    = $this->getProject();
52
+        $project = $this->getProject();
53 53
 
54 54
         if (empty($project)) {
55 55
             return;
@@ -82,13 +82,13 @@  discard block
 block discarded – undo
82 82
 
83 83
         $params = array(
84 84
             'state' => $status,
85
-            'target_url' => $phpciUrl . '/build/view/' . $this->getId(),
85
+            'target_url' => $phpciUrl.'/build/view/'.$this->getId(),
86 86
             'description' => $description,
87 87
             'context' => 'PHPCI',
88 88
         );
89 89
 
90 90
         $headers = array(
91
-            'Authorization: token ' . $token,
91
+            'Authorization: token '.$token,
92 92
             'Content-Type: application/x-www-form-urlencoded'
93 93
         );
94 94
 
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
         $key = trim($this->getProject()->getSshPrivateKey());
105 105
 
106 106
         if (!empty($key)) {
107
-            return '[email protected]:' . $this->getProject()->getReference() . '.git';
107
+            return '[email protected]:'.$this->getProject()->getReference().'.git';
108 108
         } else {
109
-            return 'https://github.com/' . $this->getProject()->getReference() . '.git';
109
+            return 'https://github.com/'.$this->getProject()->getReference().'.git';
110 110
         }
111 111
     }
112 112
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 
123 123
         if (!is_null($project)) {
124 124
             $reference = $project->getReference();
125
-            $commitLink = '<a target="_blank" href="https://github.com/' . $reference . '/issues/$1">#$1</a>';
125
+            $commitLink = '<a target="_blank" href="https://github.com/'.$reference.'/issues/$1">#$1</a>';
126 126
             $rtn = preg_replace('/\#([0-9]+)/', $commitLink, $rtn);
127 127
             $rtn = preg_replace('/\@([a-zA-Z0-9_]+)/', '<a target="_blank" href="https://github.com/$1">@$1</a>', $rtn);
128 128
         }
@@ -148,8 +148,8 @@  discard block
 block discarded – undo
148 148
             $branch = $this->getExtra('remote_branch');
149 149
         }
150 150
 
151
-        $link = 'https://github.com/' . $reference . '/';
152
-        $link .= 'blob/' . $branch . '/';
151
+        $link = 'https://github.com/'.$reference.'/';
152
+        $link .= 'blob/'.$branch.'/';
153 153
         $link .= '{FILE}';
154 154
         $link .= '#L{LINE}-L{LINE_END}';
155 155
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                 $remoteUrl = $this->getExtra('remote_url');
174 174
                 $remoteBranch = $this->getExtra('remote_branch');
175 175
 
176
-                $cmd = 'cd "%s" && git checkout -b phpci/' . $this->getId() . ' %s && git pull -q --no-edit %s %s';
176
+                $cmd = 'cd "%s" && git checkout -b phpci/'.$this->getId().' %s && git pull -q --no-edit %s %s';
177 177
                 $success = $builder->executeCommand($cmd, $cloneTo, $this->getBranch(), $remoteUrl, $remoteBranch);
178 178
             }
179 179
         } catch (\Exception $ex) {
Please login to merge, or discard this patch.