Completed
Pull Request — master (#4852)
by
unknown
15:00
created
ext/Recorder.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
             ->produce();
270 270
 
271 271
         file_put_contents(codecept_output_dir().'records.html', $indexHTML);
272
-        $this->writeln("⏺ Records saved into: <info>file://" . codecept_output_dir().'records.html</info>');
272
+        $this->writeln("⏺ Records saved into: <info>file://".codecept_output_dir().'records.html</info>');
273 273
     }
274 274
 
275 275
     public function before(TestEvent $e)
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         $this->stepNum = 0;
282 282
         $this->slides = [];
283 283
         $testName = preg_replace('~\W~', '_', Descriptor::getTestAsString($e->getTest()));
284
-        $this->dir = codecept_output_dir() . "record_{$this->seed}_$testName";
284
+        $this->dir = codecept_output_dir()."record_{$this->seed}_$testName";
285 285
         @mkdir($this->dir);
286 286
     }
287 287
 
@@ -328,9 +328,9 @@  discard block
 block discarded – undo
328 328
             ->place('carousel_class', $this->config['animate_slides'] ? ' slide' : '')
329 329
             ->produce();
330 330
 
331
-        $indexFile = $this->dir . DIRECTORY_SEPARATOR . 'index.html';
331
+        $indexFile = $this->dir.DIRECTORY_SEPARATOR.'index.html';
332 332
         file_put_contents($indexFile, $html);
333
-        $testName = Descriptor::getTestSignature($e->getTest()). ' - '.ucfirst($e->getTest()->getFeature());
333
+        $testName = Descriptor::getTestSignature($e->getTest()).' - '.ucfirst($e->getTest()->getFeature());
334 334
         $this->recordedTests[$testName] = substr($indexFile, strlen(codecept_output_dir()));
335 335
     }
336 336
 
@@ -343,8 +343,8 @@  discard block
 block discarded – undo
343 343
             return;
344 344
         }
345 345
 
346
-        $filename = str_pad($this->stepNum, 3, "0", STR_PAD_LEFT) . '.png';
347
-        $this->webDriverModule->_saveScreenshot($this->dir . DIRECTORY_SEPARATOR . $filename);
346
+        $filename = str_pad($this->stepNum, 3, "0", STR_PAD_LEFT).'.png';
347
+        $this->webDriverModule->_saveScreenshot($this->dir.DIRECTORY_SEPARATOR.$filename);
348 348
         $this->stepNum++;
349 349
         $this->slides[$filename] = $e->getStep();
350 350
     }
Please login to merge, or discard this patch.
src/Codeception/Module/Doctrine2.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
         $this->debug($qb->getDQL());
363 363
         $res = $qb->getQuery()->getArrayResult();
364 364
 
365
-        return ['True', (count($res) > 0), "$entity with " . json_encode($params)];
365
+        return ['True', (count($res) > 0), "$entity with ".json_encode($params)];
366 366
     }
367 367
 
368 368
     /**
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
         $this->em->flush();
391 391
         $data = $this->em->getClassMetadata($entity);
392 392
         $qb = $this->em->getRepository($entity)->createQueryBuilder('s');
393
-        $qb->select('s.' . $field);
393
+        $qb->select('s.'.$field);
394 394
         $this->buildAssociationQuery($qb, $entity, 's', $params);
395 395
         $this->debug($qb->getDQL());
396 396
         return $qb->getQuery()->getSingleScalarResult();
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
                                 $this->buildAssociationQuery($qb, $map['targetEntity'], $column, $v);
418 418
                                 continue;
419 419
                             }
420
-                            $paramname = "_$key" . '__' . $column;
420
+                            $paramname = "_$key".'__'.$column;
421 421
                             $qb->andWhere("_$key.$column = :$paramname");
422 422
                             $qb->setParameter($paramname, $v);
423 423
                         }
Please login to merge, or discard this patch.
src/Codeception/SuiteManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         foreach ($this->moduleContainer->all() as $module) {
80 80
             $module->_initialize();
81 81
         }
82
-        if ($this->settings['actor'] && !file_exists(Configuration::supportDir() . $this->settings['actor'] . '.php')) {
82
+        if ($this->settings['actor'] && !file_exists(Configuration::supportDir().$this->settings['actor'].'.php')) {
83 83
             throw new Exception\ConfigurationException(
84 84
                 $this->settings['actor']
85 85
                 . " class doesn't exist in suite folder.\nRun the 'build' command to generate it"
@@ -135,11 +135,11 @@  discard block
 block discarded – undo
135 135
         $suite = new Suite();
136 136
         $suite->setBaseName(preg_replace('~\s.+$~', '', $name)); // replace everything after space (env name)
137 137
         if ($this->settings['namespace']) {
138
-            $name = $this->settings['namespace'] . ".$name";
138
+            $name = $this->settings['namespace'].".$name";
139 139
         }
140 140
         $suite->setName($name);
141 141
         if (isset($this->settings['backup_globals'])) {
142
-            $suite->setBackupGlobals((bool) $this->settings['backup_globals']);
142
+            $suite->setBackupGlobals((bool)$this->settings['backup_globals']);
143 143
         }
144 144
 
145 145
         if (isset($this->settings['be_strict_about_changes_to_global_state']) && method_exists($suite, 'setbeStrictAboutChangesToGlobalState')) {
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
             return null;
181 181
         }
182 182
         return $this->settings['namespace']
183
-            ? rtrim($this->settings['namespace'], '\\') . '\\' . $this->settings['actor']
183
+            ? rtrim($this->settings['namespace'], '\\').'\\'.$this->settings['actor']
184 184
             : $this->settings['actor'];
185 185
     }
186 186
 
Please login to merge, or discard this patch.
src/Codeception/Subscriber/AutoRebuild.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
 
26 26
         $modules = $e->getSuite()->getModules();
27 27
 
28
-        $actorActionsFile = Configuration::supportDir() . '_generated' . DIRECTORY_SEPARATOR
29
-            . $settings['actor'] . 'Actions.php';
28
+        $actorActionsFile = Configuration::supportDir().'_generated'.DIRECTORY_SEPARATOR
29
+            . $settings['actor'].'Actions.php';
30 30
 
31 31
         if (!file_exists($actorActionsFile)) {
32 32
             codecept_debug("Generating {$settings['actor']}Actions...");
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 
57 57
     protected function generateActorActions($actorActionsFile, $settings)
58 58
     {
59
-        if (!file_exists(Configuration::supportDir() . '_generated')) {
60
-            @mkdir(Configuration::supportDir() . '_generated');
59
+        if (!file_exists(Configuration::supportDir().'_generated')) {
60
+            @mkdir(Configuration::supportDir().'_generated');
61 61
         }
62 62
         $actionsGenerator = new Actions($settings);
63 63
         $generated = $actionsGenerator->produce();
Please login to merge, or discard this patch.
src/Codeception/Lib/Generator/Cept.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
             throw new ConfigurationException("Cept can't be created for suite without an actor. Add `actor: SomeTester` to suite config");
29 29
         }
30 30
         $use = '';
31
-        if (! empty($this->settings['namespace'])) {
31
+        if (!empty($this->settings['namespace'])) {
32 32
             $namespace = rtrim($this->settings['namespace'], '\\');
33 33
             $use = "use {$namespace}\\$actor;";
34 34
         }
Please login to merge, or discard this patch.
src/Codeception/Lib/Generator/StepObject.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         $this->settings = $settings;
39 39
         $this->name = $this->getShortClassName($name);
40
-        $this->namespace = $this->getNamespaceString($this->settings['namespace'] . '\\Step\\' . $name);
40
+        $this->namespace = $this->getNamespaceString($this->settings['namespace'].'\\Step\\'.$name);
41 41
     }
42 42
 
43 43
     public function produce()
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
         if (!$actor) {
47 47
             throw new ConfigurationException("Steps can't be created for suite without an actor");
48 48
         }
49
-        $ns = $this->getNamespaceString($this->settings['namespace'] . '\\' . $actor . '\\' . $this->name);
49
+        $ns = $this->getNamespaceString($this->settings['namespace'].'\\'.$actor.'\\'.$this->name);
50 50
         $ns = ltrim($ns, '\\');
51 51
 
52
-        $extended = '\\' . ltrim('\\' . $this->settings['namespace'] . '\\' . $actor, '\\');
52
+        $extended = '\\'.ltrim('\\'.$this->settings['namespace'].'\\'.$actor, '\\');
53 53
 
54 54
         return (new Template($this->template))
55 55
             ->place('namespace', $this->namespace)
Please login to merge, or discard this patch.
src/Codeception/Lib/Generator/PageObject.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     {
62 62
         $this->settings = $settings;
63 63
         $this->name = $this->getShortClassName($name);
64
-        $this->namespace = $this->getNamespaceString($this->settings['namespace'] . '\\Page\\' . $name);
64
+        $this->namespace = $this->getNamespaceString($this->settings['namespace'].'\\Page\\'.$name);
65 65
     }
66 66
 
67 67
     public function produce()
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $actor = lcfirst($this->settings['actor']);
83 83
         $actorClass = $this->settings['actor'];
84 84
         if (!empty($this->settings['namespace'])) {
85
-            $actorClass = rtrim($this->settings['namespace'], '\\') . '\\' . $actorClass;
85
+            $actorClass = rtrim($this->settings['namespace'], '\\').'\\'.$actorClass;
86 86
         }
87 87
 
88 88
         return (new Template($this->actionsTemplate))
Please login to merge, or discard this patch.
src/Codeception/Test/Loader/Gherkin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         }
49 49
         $gherkin = new \ReflectionClass('Behat\Gherkin\Gherkin');
50 50
         $gherkinClassPath = dirname($gherkin->getFileName());
51
-        $i18n = require $gherkinClassPath . '/../../../i18n.php';
51
+        $i18n = require $gherkinClassPath.'/../../../i18n.php';
52 52
         $keywords = new GherkinKeywords($i18n);
53 53
         $lexer = new GherkinLexer($keywords);
54 54
         $this->parser = new GherkinParser($lexer);
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
         if (empty($this->steps) && empty($contexts['default']) && $this->settings['actor']) { // if no context is set, actor to be a context
70 70
             $actorContext = $this->settings['namespace']
71
-                ? rtrim($this->settings['namespace'] . '\\' . $this->settings['actor'], '\\')
71
+                ? rtrim($this->settings['namespace'].'\\'.$this->settings['actor'], '\\')
72 72
                 : $this->settings['actor'];
73 73
             if ($actorContext) {
74 74
                 $contexts['default'][] = $actorContext;
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
                 foreach ($scenarioNode->getExamples() as $example) {
170 170
                     /** @var $example ExampleNode  **/
171 171
                     $params = implode(', ', $example->getTokens());
172
-                    $exampleNode = new ScenarioNode($scenarioNode->getTitle() . " | $params", $scenarioNode->getTags(), $example->getSteps(), $example->getKeyword(), $example->getLine());
172
+                    $exampleNode = new ScenarioNode($scenarioNode->getTitle()." | $params", $scenarioNode->getTags(), $example->getSteps(), $example->getKeyword(), $example->getLine());
173 173
                     $this->tests[] = new GherkinFormat($featureNode, $exampleNode, $steps);
174 174
                 }
175 175
                 continue;
Please login to merge, or discard this patch.
src/Codeception/Command/GenerateStepObject.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,15 +44,15 @@
 block discarded – undo
44 44
 
45 45
         $class = $this->getShortClassName($step);
46 46
 
47
-        $path = $this->createDirectoryFor(Configuration::supportDir() . 'Step' . DIRECTORY_SEPARATOR . ucfirst($suite), $step);
47
+        $path = $this->createDirectoryFor(Configuration::supportDir().'Step'.DIRECTORY_SEPARATOR.ucfirst($suite), $step);
48 48
 
49 49
         $dialog = $this->getHelperSet()->get('question');
50
-        $filename = $path . $class . '.php';
50
+        $filename = $path.$class.'.php';
51 51
 
52 52
         $helper = $this->getHelper('question');
53 53
         $question = new Question("Add action to StepObject class (ENTER to exit): ");
54 54
 
55
-        $gen = new StepObjectGenerator($config, ucfirst($suite) . '\\' . $step);
55
+        $gen = new StepObjectGenerator($config, ucfirst($suite).'\\'.$step);
56 56
 
57 57
         if (!$input->getOption('silent')) {
58 58
             do {
Please login to merge, or discard this patch.