Completed
Pull Request — master (#4852)
by
unknown
15:00
created
src/Codeception/Module/ZF1.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -107,9 +107,9 @@  discard block
 block discarded – undo
107 107
         defined('APPLICATION_ENV') || define('APPLICATION_ENV', $this->config['env']);
108 108
         defined('APPLICATION_PATH') || define(
109 109
             'APPLICATION_PATH',
110
-            Configuration::projectDir() . $this->config['app_path']
110
+            Configuration::projectDir().$this->config['app_path']
111 111
         );
112
-        defined('LIBRARY_PATH') || define('LIBRARY_PATH', Configuration::projectDir() . $this->config['lib_path']);
112
+        defined('LIBRARY_PATH') || define('LIBRARY_PATH', Configuration::projectDir().$this->config['lib_path']);
113 113
 
114 114
         // Ensure library/ is on include_path
115 115
         set_include_path(
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         try {
135 135
             $this->bootstrap = new \Zend_Application(
136 136
                 $this->config['env'],
137
-                Configuration::projectDir() . $this->config['config']
137
+                Configuration::projectDir().$this->config['config']
138 138
             );
139 139
         } catch (\Exception $e) {
140 140
             throw new ModuleException(__CLASS__, $e->getMessage());
@@ -184,8 +184,8 @@  discard block
 block discarded – undo
184 184
             $profiler = $this->db->getProfiler();
185 185
             $queries = $profiler->getTotalNumQueries() - $this->queries;
186 186
             $time = $profiler->getTotalElapsedSecs() - $this->time;
187
-            $this->debugSection('Db', $queries . ' queries');
188
-            $this->debugSection('Time', round($time, 2) . ' secs taken');
187
+            $this->debugSection('Db', $queries.' queries');
188
+            $this->debugSection('Time', round($time, 2).' secs taken');
189 189
             $this->time = $profiler->getTotalElapsedSecs();
190 190
             $this->queries = $profiler->getTotalNumQueries();
191 191
         }
@@ -264,6 +264,6 @@  discard block
 block discarded – undo
264 264
             }
265 265
         }
266 266
         $regex = implode('\.', $parts);
267
-        $this->domainCollector []= '/^' . $regex . '$/iu';
267
+        $this->domainCollector [] = '/^'.$regex.'$/iu';
268 268
     }
269 269
 }
Please login to merge, or discard this patch.
src/Codeception/Lib/Driver/MySql.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
         $this->dbh->exec('SET FOREIGN_KEY_CHECKS=0;');
9 9
         $res = $this->dbh->query("SHOW FULL TABLES WHERE TABLE_TYPE LIKE '%TABLE';")->fetchAll();
10 10
         foreach ($res as $row) {
11
-            $this->dbh->exec('drop table `' . $row[0] . '`');
11
+            $this->dbh->exec('drop table `'.$row[0].'`');
12 12
         }
13 13
         $this->dbh->exec('SET FOREIGN_KEY_CHECKS=1;');
14 14
     }
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
     public function getQuotedName($name)
24 24
     {
25
-        return '`' . str_replace('.', '`.`', $name) . '`';
25
+        return '`'.str_replace('.', '`.`', $name).'`';
26 26
     }
27 27
 
28 28
     /**
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
         if (!isset($this->primaryKeys[$tableName])) {
36 36
             $primaryKey = [];
37 37
             $stmt = $this->getDbh()->query(
38
-                'SHOW KEYS FROM ' . $this->getQuotedName($tableName) . ' WHERE Key_name = "PRIMARY"'
38
+                'SHOW KEYS FROM '.$this->getQuotedName($tableName).' WHERE Key_name = "PRIMARY"'
39 39
             );
40 40
             $columns = $stmt->fetchAll(\PDO::FETCH_ASSOC);
41 41
 
42 42
             foreach ($columns as $column) {
43
-                $primaryKey []= $column['Column_name'];
43
+                $primaryKey [] = $column['Column_name'];
44 44
             }
45 45
             $this->primaryKeys[$tableName] = $primaryKey;
46 46
         }
Please login to merge, or discard this patch.
src/Codeception/Module/FTP.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
 
143 143
         // Clean up temp files
144 144
         if ($this->config['cleanup']) {
145
-            if (file_exists($this->config['tmp'] . '/ftp_data_file.tmp')) {
146
-                unlink($this->config['tmp'] . '/ftp_data_file.tmp');
145
+            if (file_exists($this->config['tmp'].'/ftp_data_file.tmp')) {
146
+                unlink($this->config['tmp'].'/ftp_data_file.tmp');
147 147
             }
148 148
         }
149 149
     }
@@ -177,8 +177,8 @@  discard block
 block discarded – undo
177 177
      */
178 178
     public function amInPath($path)
179 179
     {
180
-        $this->_changeDirectory($this->path = $this->absolutizePath($path) . ($path == '/' ? '' : DIRECTORY_SEPARATOR));
181
-        $this->debug('Moved to ' . $this->path);
180
+        $this->_changeDirectory($this->path = $this->absolutizePath($path).($path == '/' ? '' : DIRECTORY_SEPARATOR));
181
+        $this->debug('Moved to '.$this->path);
182 182
     }
183 183
 
184 184
     /**
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         if (strpos($path, '/') === 0) {
193 193
             return $path;
194 194
         }
195
-        return $this->path . $path;
195
+        return $this->path.$path;
196 196
     }
197 197
 
198 198
     // ----------- SEARCH METHODS BELOW HERE ------------------------//
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
                         $file
462 462
                     );
463 463
                     $display_files[] = $file;
464
-                    $this->debug('    - ' . $file);
464
+                    $this->debug('    - '.$file);
465 465
                 }
466 466
             }
467 467
             return $ignore ? $display_files : $files;
@@ -557,14 +557,14 @@  discard block
 block discarded – undo
557 557
      */
558 558
     private function _openConnection($user = 'anonymous', $password = '')
559 559
     {
560
-        $this->_closeConnection();   // Close connection if already open
560
+        $this->_closeConnection(); // Close connection if already open
561 561
         if ($this->isSFTP()) {
562 562
             $this->sftpConnect($user, $password);
563 563
         } else {
564 564
             $this->ftpConnect($user, $password);
565 565
         }
566 566
         $pwd = $this->grabDirectory();
567
-        $this->path = $pwd . ($pwd == '/' ? '' : DIRECTORY_SEPARATOR);
567
+        $this->path = $pwd.($pwd == '/' ? '' : DIRECTORY_SEPARATOR);
568 568
     }
569 569
 
570 570
     /**
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
         }
649 649
 
650 650
         // Download file to local tmp directory
651
-        $tmp_file = $this->config['tmp'] . "/ftp_data_file.tmp";
651
+        $tmp_file = $this->config['tmp']."/ftp_data_file.tmp";
652 652
 
653 653
         if ($this->isSFTP()) {
654 654
             $downloaded = @$this->ftp->get($filename, $tmp_file);
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
         }
682 682
 
683 683
         // Build temp file
684
-        $tmp_file = $this->config['tmp'] . "/ftp_data_file.tmp";
684
+        $tmp_file = $this->config['tmp']."/ftp_data_file.tmp";
685 685
         file_put_contents($tmp_file, $contents);
686 686
 
687 687
         // Update variables
Please login to merge, or discard this patch.
src/Codeception/Lib/Connector/Guzzle.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
         if (strpos($contentType, 'charset=') === false) {
107 107
             $body = $response->getBody(true);
108 108
             if (preg_match('/\<meta[^\>]+charset *= *["\']?([a-zA-Z\-0-9]+)/i', $body, $matches)) {
109
-                $contentType .= ';charset=' . $matches[1];
109
+                $contentType .= ';charset='.$matches[1];
110 110
             }
111 111
             $response->setHeader('Content-Type', $contentType);
112 112
         }
Please login to merge, or discard this patch.
src/Codeception/Util/sq.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
             return Sequence::$hash[$id];
9 9
         }
10 10
         $prefix = str_replace('{id}', $id, Sequence::$prefix);
11
-        $sequence = $prefix . uniqid($id);
11
+        $sequence = $prefix.uniqid($id);
12 12
         if ($id) {
13 13
             Sequence::$hash[$id] = $sequence;
14 14
         }
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
             return Sequence::$suiteHash[$id];
24 24
         }
25 25
         $prefix = str_replace('{id}', $id, Sequence::$prefix);
26
-        $sequence = $prefix . uniqid($id);
26
+        $sequence = $prefix.uniqid($id);
27 27
         if ($id) {
28 28
             Sequence::$suiteHash[$id] = $sequence;
29 29
         }
Please login to merge, or discard this patch.
src/Codeception/Module/Sequence.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
 }
123 123
 
124 124
 if (!function_exists('sq') && !function_exists('sqs')) {
125
-    require_once __DIR__ . '/../Util/sq.php';
125
+    require_once __DIR__.'/../Util/sq.php';
126 126
 } else {
127 127
     throw new ModuleException('Codeception\Module\Sequence', "function 'sq' and 'sqs' already defined");
128 128
 }
Please login to merge, or discard this patch.
src/Codeception/Lib/Notification.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@
 block discarded – undo
7 7
 
8 8
     public static function warning($message, $location)
9 9
     {
10
-        self::$messages[] = 'WARNING: ' . self::formatMessage($message, $location);
10
+        self::$messages[] = 'WARNING: '.self::formatMessage($message, $location);
11 11
     }
12 12
 
13 13
     public static function deprecate($message, $location = '')
14 14
     {
15
-        self::$messages[] = 'DEPRECATION: ' . self::formatMessage($message, $location);
15
+        self::$messages[] = 'DEPRECATION: '.self::formatMessage($message, $location);
16 16
     }
17 17
 
18 18
     private static function formatMessage($message, $location = '')
Please login to merge, or discard this patch.
src/Codeception/Module/Redis.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -324,8 +324,8 @@  discard block
 block discarded – undo
324 324
     public function dontSeeInRedis($key, $value = null)
325 325
     {
326 326
         $this->assertFalse(
327
-            (bool) $this->checkKeyExists($key, $value),
328
-            "The key \"$key\" exists" . ($value ? ' and its value matches the one provided' : '')
327
+            (bool)$this->checkKeyExists($key, $value),
328
+            "The key \"$key\" exists".($value ? ' and its value matches the one provided' : '')
329 329
         );
330 330
     }
331 331
 
@@ -361,8 +361,8 @@  discard block
 block discarded – undo
361 361
     public function dontSeeRedisKeyContains($key, $item, $itemValue = null)
362 362
     {
363 363
         $this->assertFalse(
364
-            (bool) $this->checkKeyContains($key, $item, $itemValue),
365
-            "The key \"$key\" contains " . (
364
+            (bool)$this->checkKeyContains($key, $item, $itemValue),
365
+            "The key \"$key\" contains ".(
366 366
                 is_null($itemValue)
367 367
                 ? "\"$item\""
368 368
                 : "[\"$item\" => \"$itemValue\"]"
@@ -397,8 +397,8 @@  discard block
 block discarded – undo
397 397
     public function seeInRedis($key, $value = null)
398 398
     {
399 399
         $this->assertTrue(
400
-            (bool) $this->checkKeyExists($key, $value),
401
-            "Cannot find key \"$key\"" . ($value ? ' with the provided value' : '')
400
+            (bool)$this->checkKeyExists($key, $value),
401
+            "Cannot find key \"$key\"".($value ? ' with the provided value' : '')
402 402
         );
403 403
     }
404 404
 
@@ -461,8 +461,8 @@  discard block
 block discarded – undo
461 461
     public function seeRedisKeyContains($key, $item, $itemValue = null)
462 462
     {
463 463
         $this->assertTrue(
464
-            (bool) $this->checkKeyContains($key, $item, $itemValue),
465
-            "The key \"$key\" does not contain " . (
464
+            (bool)$this->checkKeyContains($key, $item, $itemValue),
465
+            "The key \"$key\" does not contain ".(
466 466
             is_null($itemValue)
467 467
                 ? "\"$item\""
468 468
                 : "[\"$item\" => \"$itemValue\"]"
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
                 if (is_null($reply)) {
535 535
                     $result = false;
536 536
                 } elseif (!is_null($itemValue)) {
537
-                    $result = (float) $reply === (float) $itemValue;
537
+                    $result = (float)$reply === (float)$itemValue;
538 538
                 } else {
539 539
                     $result = true;
540 540
                 }
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
 
546 546
                 $result = is_null($itemValue)
547 547
                     ? !is_null($reply)
548
-                    : (string) $reply === (string) $itemValue;
548
+                    : (string)$reply === (string)$itemValue;
549 549
                 break;
550 550
 
551 551
             case 'none':
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
     private function scoresToFloat(array $arr)
631 631
     {
632 632
         foreach ($arr as $member => $score) {
633
-            $arr[$member] = (float) $score;
633
+            $arr[$member] = (float)$score;
634 634
         }
635 635
 
636 636
         return $arr;
Please login to merge, or discard this patch.
ext/Logger.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $this->path = $this->getLogDir();
67 67
 
68 68
         // internal log
69
-        $logHandler = new RotatingFileHandler($this->path . 'codeception.log', $this->config['max_files']);
69
+        $logHandler = new RotatingFileHandler($this->path.'codeception.log', $this->config['max_files']);
70 70
         $this->logger = new \Monolog\Logger('Codeception');
71 71
         $this->logger->pushHandler($logHandler);
72 72
     }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     public function beforeSuite(SuiteEvent $e)
75 75
     {
76 76
         $suite = str_replace('\\', '_', $e->getSuite()->getName());
77
-        $this->logHandler = new RotatingFileHandler($this->path . $suite, $this->config['max_files']);
77
+        $this->logHandler = new RotatingFileHandler($this->path.$suite, $this->config['max_files']);
78 78
     }
79 79
 
80 80
     public function beforeTest(TestEvent $e)
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $this->logger = new \Monolog\Logger(Descriptor::getTestFileName($e->getTest()));
83 83
         $this->logger->pushHandler($this->logHandler);
84 84
         $this->logger->info('------------------------------------');
85
-        $this->logger->info("STARTED: " . ucfirst(Descriptor::getTestAsString($e->getTest())));
85
+        $this->logger->info("STARTED: ".ucfirst(Descriptor::getTestAsString($e->getTest())));
86 86
     }
87 87
 
88 88
     public function afterTest(TestEvent $e)
@@ -118,6 +118,6 @@  discard block
 block discarded – undo
118 118
 
119 119
     public function beforeStep(StepEvent $e)
120 120
     {
121
-        $this->logger->info((string) $e->getStep());
121
+        $this->logger->info((string)$e->getStep());
122 122
     }
123 123
 }
Please login to merge, or discard this patch.