Completed
Pull Request — master (#4852)
by
unknown
15:00
created
src/Codeception/Module/DataFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
         $this->factoryMuffin = new FactoryMuffin($store);
165 165
 
166 166
         if ($this->config['factories']) {
167
-            foreach ((array) $this->config['factories'] as $factoryPath) {
167
+            foreach ((array)$this->config['factories'] as $factoryPath) {
168 168
                 $realpath = realpath(codecept_root_dir().$factoryPath);
169 169
                 if ($realpath === false) {
170 170
                     throw new ModuleException($this, 'The path to one of your factories is not correct. Please specify the directory relative to the codeception.yml file (ie. _support/factories).');
Please login to merge, or discard this patch.
src/Codeception/Module/AMQP.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         try {
97 97
             $this->connection = new AMQPStreamConnection($host, $port, $username, $password, $vhost);
98 98
         } catch (Exception $e) {
99
-            throw new ModuleException(__CLASS__, $e->getMessage() . ' while establishing connection to MQ server');
99
+            throw new ModuleException(__CLASS__, $e->getMessage().' while establishing connection to MQ server');
100 100
         }
101 101
     }
102 102
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
      */
209 209
     public function purgeQueue($queueName = '')
210 210
     {
211
-        if (! in_array($queueName, $this->config['queues'])) {
211
+        if (!in_array($queueName, $this->config['queues'])) {
212 212
             throw new ModuleException(__CLASS__, "'$queueName' doesn't exist in queues config list");
213 213
         }
214 214
 
Please login to merge, or discard this patch.
src/Codeception/Test/Loader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     {
70 70
         if (!file_exists($path)
71 71
             && substr($path, -strlen('.php')) !== '.php'
72
-            && file_exists($newPath = $path . '.php')
72
+            && file_exists($newPath = $path.'.php')
73 73
         ) {
74 74
             return $newPath;
75 75
         }
@@ -79,10 +79,10 @@  discard block
 block discarded – undo
79 79
 
80 80
     protected function makePath($originalPath)
81 81
     {
82
-        $path = $this->path . $this->relativeName($originalPath);
82
+        $path = $this->path.$this->relativeName($originalPath);
83 83
 
84 84
         if (file_exists($newPath = $this->findPath($path))
85
-            || file_exists($newPath = $this->findPath(getcwd() . "/{$originalPath}"))
85
+            || file_exists($newPath = $this->findPath(getcwd()."/{$originalPath}"))
86 86
         ) {
87 87
             $path = $newPath;
88 88
         }
Please login to merge, or discard this patch.
src/Codeception/Test/Unit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         $names = [];
109 109
         foreach ($this->getMetadata()->getDependencies() as $required) {
110 110
             if ((strpos($required, ':') === false) and method_exists($this, $required)) {
111
-                $required = get_class($this) . ":$required";
111
+                $required = get_class($this).":$required";
112 112
             }
113 113
             $names[] = $required;
114 114
         }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         foreach ($dependencies as $dependency) {
132 132
             $dependency = str_replace(':', '::', $dependency); // Codeception => PHPUnit format
133 133
             if (strpos($dependency, '::') === false) {         // check it is method of same class
134
-                $dependency = get_class($this) . '::' . $dependency;
134
+                $dependency = get_class($this).'::'.$dependency;
135 135
             }
136 136
             if (isset($passed[$dependency])) {
137 137
                 $dependencyInput[] = $passed[$dependency]['result'];
Please login to merge, or discard this patch.
src/Codeception/Command/SelfUpdate.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
         return array_reduce(
138 138
             $stableVersions,
139
-            function ($a, $b) {
139
+            function($a, $b) {
140 140
                 return version_compare($a, $b, '>') ? $a : $b;
141 141
             }
142 142
         );
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     private function filterStableVersions($tags)
150 150
     {
151
-        return array_filter($tags, function ($tag) {
151
+        return array_filter($tags, function($tag) {
152 152
             return preg_match('/^[0-9]+\.[0-9]+\.[0-9]+$/', $tag);
153 153
         });
154 154
     }
@@ -162,11 +162,11 @@  discard block
 block discarded – undo
162 162
     protected function getGithubTags($repo)
163 163
     {
164 164
         $jsonTags = $this->retrieveContentFromUrl(
165
-            'https://api.github.com/repos/' . $repo . '/tags'
165
+            'https://api.github.com/repos/'.$repo.'/tags'
166 166
         );
167 167
 
168 168
         return array_map(
169
-            function ($tag) {
169
+            function($tag) {
170 170
                 return $tag['name'];
171 171
             },
172 172
             json_decode($jsonTags, true)
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
      */
251 251
     protected function retrievePharFile($version, OutputInterface $output)
252 252
     {
253
-        $temp = basename($this->filename, '.phar') . '-temp.phar';
253
+        $temp = basename($this->filename, '.phar').'-temp.phar';
254 254
 
255 255
         try {
256 256
             $sourceUrl = $this->getPharUrl($version);
Please login to merge, or discard this patch.
src/Codeception/Lib/Generator/Actor.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
         $params = [];
100 100
         foreach ($refMethod->getParameters() as $param) {
101 101
             if ($param->isOptional()) {
102
-                $params[] = '$' . $param->name . ' = '.$this->getDefaultValue($param);
102
+                $params[] = '$'.$param->name.' = '.$this->getDefaultValue($param);
103 103
             } else {
104
-                $params[] = '$' . $param->name;
104
+                $params[] = '$'.$param->name;
105 105
             };
106 106
         }
107 107
         return implode(', ', $params);
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      */
175 175
     private function phpEncodeArray(array $array)
176 176
     {
177
-        $isPlainArray = function (array $value) {
177
+        $isPlainArray = function(array $value) {
178 178
             return ((count($value) === 0)
179 179
                 || (
180 180
                     (array_keys($value) === range(0, count($value) - 1))
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
             return '['.implode(', ', array_map([$this, 'phpEncodeValue'], $array)).']';
187 187
         }
188 188
 
189
-        return '['.implode(', ', array_map(function ($key) use ($array) {
189
+        return '['.implode(', ', array_map(function($key) use ($array) {
190 190
             return $this->phpEncodeValue($key).' => '.$this->phpEncodeValue($array[$key]);
191 191
         }, array_keys($array))).']';
192 192
     }
Please login to merge, or discard this patch.
src/Codeception/Lib/Connector/ZF1.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         $queryString = parse_url($uri, PHP_URL_QUERY);
62 62
         $requestUri = parse_url($uri, PHP_URL_PATH);
63 63
         if (!empty($queryString)) {
64
-            $requestUri .= '?' . $queryString;
64
+            $requestUri .= '?'.$queryString;
65 65
         }
66 66
         $zendRequest->setRequestUri($requestUri);
67 67
 
Please login to merge, or discard this patch.
src/Codeception/Lib/Connector/Shared/PhpSuperGlobalsConverter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
                      * to ['tmp_name' => ['a' => '/tmp/test.txt'] ]
79 79
                      */
80 80
                     $innerInfo = array_map(
81
-                        function ($v) use ($innerName) {
81
+                        function($v) use ($innerName) {
82 82
                             return [$innerName => $v];
83 83
                         },
84 84
                         $innerInfo
Please login to merge, or discard this patch.
src/Codeception/Lib/Connector/Yii2/Logger.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
         ])) {
20 20
             return;
21 21
         }
22
-        if (strpos($category, 'yii\db\Command')===0) {
22
+        if (strpos($category, 'yii\db\Command') === 0) {
23 23
             return; // don't log queries
24 24
         }
25 25
 
@@ -28,6 +28,6 @@  discard block
 block discarded – undo
28 28
             $message = $message->__toString();
29 29
         }
30 30
 
31
-        Debug::debug("[$category] " .  \yii\helpers\VarDumper::export($message));
31
+        Debug::debug("[$category] ".\yii\helpers\VarDumper::export($message));
32 32
     }
33 33
 }
Please login to merge, or discard this patch.