Test Setup Failed
Push — develop ( 4d8ae2...dad829 )
by Àlex
07:22
created
PHPCI/Plugin/PhpMessDetector.php 3 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     /**
133 133
      * Override a default setting.
134 134
      * @param $options
135
-     * @param $key
135
+     * @param string $key
136 136
      */
137 137
     protected function overrideSetting($options, $key)
138 138
     {
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
 
144 144
     /**
145 145
      * Process PHPMD's XML output report.
146
-     * @param $xmlString
147
-     * @return array
146
+     * @param string $xmlString
147
+     * @return integer
148 148
      * @throws \Exception
149 149
      */
150 150
     protected function processReport($xmlString)
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
     /**
204 204
      * Execute PHP Mess Detector.
205
-     * @param $binaryPath
205
+     * @param null|string $binaryPath
206 206
      */
207 207
     protected function executePhpMd($binaryPath)
208 208
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 
194 194
         foreach ($this->rules as &$rule) {
195 195
             if (strpos($rule, '/') !== false) {
196
-                $rule = $this->phpci->buildPath . $rule;
196
+                $rule = $this->phpci->buildPath.$rule;
197 197
             }
198 198
         }
199 199
 
@@ -206,18 +206,18 @@  discard block
 block discarded – undo
206 206
      */
207 207
     protected function executePhpMd($binaryPath)
208 208
     {
209
-        $cmd = $binaryPath . ' "%s" xml %s %s %s';
209
+        $cmd = $binaryPath.' "%s" xml %s %s %s';
210 210
 
211 211
         $path = $this->getTargetPath();
212 212
 
213 213
         $ignore = '';
214 214
         if (count($this->ignore)) {
215
-            $ignore = ' --exclude ' . implode(',', $this->ignore);
215
+            $ignore = ' --exclude '.implode(',', $this->ignore);
216 216
         }
217 217
 
218 218
         $suffixes = '';
219 219
         if (count($this->suffixes)) {
220
-            $suffixes = ' --suffixes ' . implode(',', $this->suffixes);
220
+            $suffixes = ' --suffixes '.implode(',', $this->suffixes);
221 221
         }
222 222
 
223 223
         // Disable exec output logging, as we don't want the XML report in the log:
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
      */
243 243
     protected function getTargetPath()
244 244
     {
245
-        $path = $this->phpci->buildPath . $this->path;
245
+        $path = $this->phpci->buildPath.$this->path;
246 246
         if (!empty($this->path) && $this->path{0} == '/') {
247 247
             $path = $this->path;
248 248
             return $path;
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/PhpUnit.php 3 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
     /**
69 69
      * Try and find the phpunit XML config file.
70
-     * @param $buildPath
70
+     * @param string $buildPath
71 71
      * @return null|string
72 72
      */
73 73
     public static function findConfigFile($buildPath)
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
     /**
186 186
      * Run the tests defined in a PHPUnit config file.
187 187
      * @param $configPath
188
-     * @return bool|mixed
188
+     * @return boolean
189 189
      */
190 190
     protected function runConfigFile($configPath)
191 191
     {
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
     /**
214 214
      * Run the PHPUnit tests in a specific directory or array of directories.
215 215
      * @param $directory
216
-     * @return bool|mixed
216
+     * @return boolean
217 217
      */
218 218
     protected function runDir($directory)
219 219
     {
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
     /**
236 236
      * @param $array
237 237
      * @param $callable
238
-     * @return bool|mixed
238
+     * @return boolean
239 239
      */
240 240
     protected function recurseArg($array, $callable)
241 241
     {
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
 
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
     }
139 139
 
140 140
     /**
141
-    * Runs PHP Unit tests in a specified directory, optionally using specified config file(s).
142
-    */
141
+     * Runs PHP Unit tests in a specified directory, optionally using specified config file(s).
142
+     */
143 143
     public function execute()
144 144
     {
145 145
         if (empty($this->xmlConfigFile) && empty($this->directory)) {
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -72,20 +72,20 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public static function findConfigFile($buildPath)
74 74
     {
75
-        if (file_exists($buildPath . 'phpunit.xml')) {
75
+        if (file_exists($buildPath.'phpunit.xml')) {
76 76
             return 'phpunit.xml';
77 77
         }
78 78
 
79
-        if (file_exists($buildPath . 'tests' . DIRECTORY_SEPARATOR . 'phpunit.xml')) {
80
-            return 'tests' . DIRECTORY_SEPARATOR . 'phpunit.xml';
79
+        if (file_exists($buildPath.'tests'.DIRECTORY_SEPARATOR.'phpunit.xml')) {
80
+            return 'tests'.DIRECTORY_SEPARATOR.'phpunit.xml';
81 81
         }
82 82
 
83
-        if (file_exists($buildPath . 'phpunit.xml.dist')) {
83
+        if (file_exists($buildPath.'phpunit.xml.dist')) {
84 84
             return 'phpunit.xml.dist';
85 85
         }
86 86
 
87
-        if (file_exists($buildPath . 'tests/phpunit.xml.dist')) {
88
-            return 'tests' . DIRECTORY_SEPARATOR . 'phpunit.xml.dist';
87
+        if (file_exists($buildPath.'tests/phpunit.xml.dist')) {
88
+            return 'tests'.DIRECTORY_SEPARATOR.'phpunit.xml.dist';
89 89
         }
90 90
 
91 91
         return null;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         }
134 134
 
135 135
         if (isset($options['coverage'])) {
136
-            $this->coverage = ' --coverage-html ' . $this->phpci->interpolate($options['coverage']) . ' ';
136
+            $this->coverage = ' --coverage-html '.$this->phpci->interpolate($options['coverage']).' ';
137 137
         }
138 138
     }
139 139
 
@@ -194,13 +194,13 @@  discard block
 block discarded – undo
194 194
         } else {
195 195
             if ($this->runFrom) {
196 196
                 $curdir = getcwd();
197
-                chdir($this->phpci->buildPath . DIRECTORY_SEPARATOR . $this->runFrom);
197
+                chdir($this->phpci->buildPath.DIRECTORY_SEPARATOR.$this->runFrom);
198 198
             }
199 199
 
200 200
             $phpunit = $this->phpci->findBinary('phpunit');
201 201
 
202
-            $cmd = $phpunit . ' --tap %s -c "%s" ' . $this->coverage . $this->path;
203
-            $success = $this->phpci->executeCommand($cmd, $this->args, $this->phpci->buildPath . $configPath);
202
+            $cmd = $phpunit.' --tap %s -c "%s" '.$this->coverage.$this->path;
203
+            $success = $this->phpci->executeCommand($cmd, $this->args, $this->phpci->buildPath.$configPath);
204 204
 
205 205
             if ($this->runFrom) {
206 206
                 chdir($curdir);
@@ -225,8 +225,8 @@  discard block
 block discarded – undo
225 225
 
226 226
             $phpunit = $this->phpci->findBinary('phpunit');
227 227
 
228
-            $cmd = $phpunit . ' --tap %s "%s"';
229
-            $success = $this->phpci->executeCommand($cmd, $this->args, $this->phpci->buildPath . $directory);
228
+            $cmd = $phpunit.' --tap %s "%s"';
229
+            $success = $this->phpci->executeCommand($cmd, $this->args, $this->phpci->buildPath.$directory);
230 230
             chdir($curdir);
231 231
             return $success;
232 232
         }
Please login to merge, or discard this patch.
PHPCI/Plugin/TechnicalDebt.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
     /**
141 141
      * Gets the number and list of errors returned from the search
142 142
      *
143
-     * @return array
143
+     * @return integer
144 144
      */
145 145
     public function getErrorList()
146 146
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
         $errorCount = $this->getErrorList();
128 128
 
129
-        $this->phpci->log("Found $errorCount instances of " . implode(', ', $this->searches));
129
+        $this->phpci->log("Found $errorCount instances of ".implode(', ', $this->searches));
130 130
 
131 131
         $this->build->storeMeta('technical_debt-warnings', $errorCount);
132 132
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
             }
164 164
 
165 165
             // Ignore hidden files, else .git, .sass_cache, etc. all get looped over
166
-            if (stripos($filePath, DIRECTORY_SEPARATOR . '.') !== false) {
166
+            if (stripos($filePath, DIRECTORY_SEPARATOR.'.') !== false) {
167 167
                 $skipFile = true;
168 168
             }
169 169
 
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
 
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
     }
123 123
 
124 124
     /**
125
-    * Runs the plugin
126
-    */
125
+     * Runs the plugin
126
+     */
127 127
     public function execute()
128 128
     {
129 129
         $success = true;
Please login to merge, or discard this patch.
PHPCI/Plugin/Util/Executor.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     /**
72 72
      * Check the config for any plugins specific to the branch we're currently building.
73 73
      * @param $config
74
-     * @param $stage
74
+     * @param string $stage
75 75
      * @param $pluginsToExecute
76 76
      * @return array
77 77
      */
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     /**
125 125
      * Execute the list of plugins found for a given testing stage.
126 126
      * @param $plugins
127
-     * @param $stage
127
+     * @param string $stage
128 128
      * @return bool
129 129
      * @throws \Exception
130 130
      */
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -82,12 +82,12 @@  discard block
 block discarded – undo
82 82
         $branch = $build->getBranch();
83 83
 
84 84
         // If we don't have any branch-specific plugins:
85
-        if (!isset($config['branch-' . $branch][$stage]) || !is_array($config['branch-' . $branch][$stage])) {
85
+        if (!isset($config['branch-'.$branch][$stage]) || !is_array($config['branch-'.$branch][$stage])) {
86 86
             return $pluginsToExecute;
87 87
         }
88 88
 
89 89
         // If we have branch-specific plugins to execute, add them to the list to be executed:
90
-        $branchConfig = $config['branch-' . $branch];
90
+        $branchConfig = $config['branch-'.$branch];
91 91
         $plugins = $branchConfig[$stage];
92 92
 
93 93
         $runOption = 'after';
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
                 if ($stage === 'setup') {
151 151
                     // If we're in the "setup" stage, execution should not continue after
152 152
                     // a plugin has failed:
153
-                    throw new Exception('Plugin failed: ' . $plugin);
153
+                    throw new Exception('Plugin failed: '.$plugin);
154 154
                 } elseif ($stage === 'test') {
155 155
                     // If we're in the "test" stage and the plugin is not allowed to fail,
156 156
                     // then mark the build as failed:
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         if (strpos($plugin, '\\') === false) {
176 176
             $class = str_replace('_', ' ', $plugin);
177 177
             $class = ucwords($class);
178
-            $class = 'PHPCI\\Plugin\\' . str_replace(' ', '', $class);
178
+            $class = 'PHPCI\\Plugin\\'.str_replace(' ', '', $class);
179 179
         } else {
180 180
             $class = $plugin;
181 181
         }
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
             $obj = $this->pluginFactory->buildPlugin($class, $options);
191 191
             return $obj->execute();
192 192
         } catch (\Exception $ex) {
193
-            $this->logger->logFailure(Lang::get('exception') . $ex->getMessage(), $ex);
193
+            $this->logger->logFailure(Lang::get('exception').$ex->getMessage(), $ex);
194 194
             return false;
195 195
         }
196 196
     }
Please login to merge, or discard this patch.
PHPCI/Plugin/Util/Factory.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * file returns a function then $this will be passed to it.
46 46
      * This enables the config file to call any public methods.
47 47
      *
48
-     * @param $configPath
48
+     * @param string $configPath
49 49
      * @return bool - true if the function exists else false.
50 50
      */
51 51
     public function addConfigFromFile($configPath)
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
 
139 139
     /**
140 140
      * Get an internal resource ID.
141
-     * @param null $type
142
-     * @param null $name
141
+     * @param string|null $type
142
+     * @param string|null $name
143 143
      * @return string
144 144
      */
145 145
     private function getInternalID($type = null, $name = null)
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
         $self = $this;
34 34
         $this->registerResource(
35
-            function () use ($self) {
35
+            function() use ($self) {
36 36
                 return $self->getLastOptions();
37 37
             },
38 38
             'options',
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
         if (!$reflectedPlugin->implementsInterface(self::INTERFACE_PHPCI_PLUGIN)) {
90 90
             throw new \InvalidArgumentException(
91
-                "Requested class must implement " . self:: INTERFACE_PHPCI_PLUGIN
91
+                "Requested class must implement ".self:: INTERFACE_PHPCI_PLUGIN
92 92
             );
93 93
         }
94 94
 
@@ -144,9 +144,9 @@  discard block
 block discarded – undo
144 144
      */
145 145
     private function getInternalID($type = null, $name = null)
146 146
     {
147
-        $type = $type ? : "";
148
-        $name = $name ? : "";
149
-        return $type . "-" . $name;
147
+        $type = $type ?: "";
148
+        $name = $name ?: "";
149
+        return $type."-".$name;
150 150
     }
151 151
 
152 152
     /**
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
             $existingArgs[] = $param->getDefaultValue();
211 211
         } else {
212 212
             throw new \DomainException(
213
-                "Unsatisfied dependency: " . $param->getName()
213
+                "Unsatisfied dependency: ".$param->getName()
214 214
             );
215 215
         }
216 216
 
Please login to merge, or discard this patch.
PHPCI/Plugin/Util/FilesPluginInformation.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     protected $pluginInfo = null;
29 29
 
30 30
     /**
31
-     * @param $dirPath
31
+     * @param string $dirPath
32 32
      * @return FilesPluginInformation
33 33
      */
34 34
     public static function newFromDir($dirPath)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     public function getPluginClasses()
70 70
     {
71 71
         return array_map(
72
-            function (\stdClass $plugin) {
72
+            function(\stdClass $plugin) {
73 73
                 return $plugin->class;
74 74
             },
75 75
             $this->getInstalledPlugins()
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             preg_match('#namespace +([A-Za-z\\\\]+);#i', $contents, $matches);
130 130
             $namespace = $matches[1];
131 131
 
132
-            return $namespace . '\\' . $className;
132
+            return $namespace.'\\'.$className;
133 133
         } else {
134 134
             return null;
135 135
         }
Please login to merge, or discard this patch.
PHPCI/Helper/UnixCommandExecutor.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,6 +22,6 @@
 block discarded – undo
22 22
      */
23 23
     protected function findGlobalBinary($binary)
24 24
     {
25
-        return trim(shell_exec('which ' . $binary));
25
+        return trim(shell_exec('which '.$binary));
26 26
     }
27 27
 }
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/Helper/LoginIsDisabled.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
         unset($method, $params);
31 31
         
32 32
         $config = Config::getInstance();
33
-        $state = (bool) $config->get('phpci.authentication_settings.state', false);
33
+        $state = (bool)$config->get('phpci.authentication_settings.state', false);
34 34
 
35 35
         return (false !== $state);
36 36
     }
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/Helper/Email.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -121,17 +121,17 @@
 block discarded – undo
121 121
         $headers = '';
122 122
 
123 123
         if ($this->isHtml) {
124
-            $headers = 'Content-Type: text/html' . PHP_EOL;
124
+            $headers = 'Content-Type: text/html'.PHP_EOL;
125 125
         }
126 126
 
127
-        $headers .= 'From: ' . $this->getFrom() . PHP_EOL;
127
+        $headers .= 'From: '.$this->getFrom().PHP_EOL;
128 128
 
129 129
         $emailTo = array();
130 130
         foreach ($this->emailTo as $email => $name) {
131 131
             $thisTo = $email;
132 132
 
133 133
             if (!is_null($name)) {
134
-                $thisTo = '"' . $name . '" <' . $thisTo . '>';
134
+                $thisTo = '"'.$name.'" <'.$thisTo.'>';
135 135
             }
136 136
 
137 137
             $emailTo[] = $thisTo;
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.