@@ -36,9 +36,9 @@ |
||
36 | 36 | $group = $input->getArgument('group'); |
37 | 37 | |
38 | 38 | $class = ucfirst($group); |
39 | - $path = $this->createDirectoryFor(Configuration::supportDir() . 'Group' . DIRECTORY_SEPARATOR, $class); |
|
39 | + $path = $this->createDirectoryFor(Configuration::supportDir().'Group'.DIRECTORY_SEPARATOR, $class); |
|
40 | 40 | |
41 | - $filename = $path . $class . '.php'; |
|
41 | + $filename = $path.$class.'.php'; |
|
42 | 42 | |
43 | 43 | $gen = new GroupGenerator($config, $group); |
44 | 44 | $res = $this->createFile($filename, $gen->produce()); |
@@ -47,7 +47,7 @@ |
||
47 | 47 | if (!preg_match('~\.feature$~', $filename)) { |
48 | 48 | $filename .= '.feature'; |
49 | 49 | } |
50 | - $full_path = rtrim($config['path'], DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $filename; |
|
50 | + $full_path = rtrim($config['path'], DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$filename; |
|
51 | 51 | $res = $this->createFile($full_path, $gen->produce()); |
52 | 52 | if (!$res) { |
53 | 53 | $output->writeln("<error>Feature $filename already exists</error>"); |
@@ -50,16 +50,16 @@ |
||
50 | 50 | : $this->getGlobalConfig(); |
51 | 51 | |
52 | 52 | if ($suite) { |
53 | - $suite = DIRECTORY_SEPARATOR . ucfirst($suite); |
|
53 | + $suite = DIRECTORY_SEPARATOR.ucfirst($suite); |
|
54 | 54 | } |
55 | 55 | |
56 | - $path = $this->createDirectoryFor(Configuration::supportDir() . 'Page' . $suite, $class); |
|
56 | + $path = $this->createDirectoryFor(Configuration::supportDir().'Page'.$suite, $class); |
|
57 | 57 | |
58 | - $filename = $path . $this->getShortClassName($class) . '.php'; |
|
58 | + $filename = $path.$this->getShortClassName($class).'.php'; |
|
59 | 59 | |
60 | 60 | $output->writeln($filename); |
61 | 61 | |
62 | - $gen = new PageObjectGenerator($conf, ucfirst($suite) . '\\' . $class); |
|
62 | + $gen = new PageObjectGenerator($conf, ucfirst($suite).'\\'.$class); |
|
63 | 63 | $res = $this->createFile($filename, $gen->produce()); |
64 | 64 | |
65 | 65 | if (!$res) { |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | $path = $input->getOption('path') |
50 | 50 | ? $input->getOption('path') |
51 | - : Configuration::dataDir() . 'scenarios'; |
|
51 | + : Configuration::dataDir().'scenarios'; |
|
52 | 52 | |
53 | 53 | $format = $input->getOption('format'); |
54 | 54 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | ); |
61 | 61 | } |
62 | 62 | |
63 | - $path = $path . DIRECTORY_SEPARATOR . $suite; |
|
63 | + $path = $path.DIRECTORY_SEPARATOR.$suite; |
|
64 | 64 | if (!$input->getOption('single-file')) { |
65 | 65 | @mkdir($path); |
66 | 66 | } |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | $suiteManager = new \Codeception\SuiteManager(new EventDispatcher(), $suite, $suiteConf); |
69 | 69 | |
70 | 70 | if ($suiteConf['bootstrap']) { |
71 | - if (file_exists($suiteConf['path'] . $suiteConf['bootstrap'])) { |
|
72 | - require_once $suiteConf['path'] . $suiteConf['bootstrap']; |
|
71 | + if (file_exists($suiteConf['path'].$suiteConf['bootstrap'])) { |
|
72 | + require_once $suiteConf['path'].$suiteConf['bootstrap']; |
|
73 | 73 | } |
74 | 74 | } |
75 | 75 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | // create separate file for each test in Cest |
88 | 88 | if ($test instanceof Cest && !$input->getOption('single-file')) { |
89 | - $name .= '.' . $this->underscore($test->getTestMethod()); |
|
89 | + $name .= '.'.$this->underscore($test->getTestMethod()); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | if ($input->getOption('single-file')) { |
@@ -94,13 +94,13 @@ discard block |
||
94 | 94 | $output->writeln("* $name rendered"); |
95 | 95 | } else { |
96 | 96 | $feature = $this->decorate($feature, $format); |
97 | - $this->createFile($path . DIRECTORY_SEPARATOR . $name . $this->formatExtension($format), $feature, true); |
|
97 | + $this->createFile($path.DIRECTORY_SEPARATOR.$name.$this->formatExtension($format), $feature, true); |
|
98 | 98 | $output->writeln("* $name generated"); |
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
102 | 102 | if ($input->getOption('single-file')) { |
103 | - $this->createFile($path . $this->formatExtension($format), $this->decorate($scenarios, $format), true); |
|
103 | + $this->createFile($path.$this->formatExtension($format), $this->decorate($scenarios, $format), true); |
|
104 | 104 | } |
105 | 105 | } |
106 | 106 |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $filename = $this->completeSuffix($filename, 'Cept'); |
45 | 45 | $gen = new Cept($config); |
46 | 46 | |
47 | - $full_path = rtrim($config['path'], DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $filename; |
|
47 | + $full_path = rtrim($config['path'], DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$filename; |
|
48 | 48 | $res = $this->createFile($full_path, $gen->produce()); |
49 | 49 | if (!$res) { |
50 | 50 | $output->writeln("<error>Test $filename already exists</error>"); |
@@ -47,7 +47,7 @@ |
||
47 | 47 | $file = "$env.yml"; |
48 | 48 | |
49 | 49 | $path = $this->createDirectoryFor($relativePath, $file); |
50 | - $saved = $this->createFile($path . $file, "# `$env` environment config goes here"); |
|
50 | + $saved = $this->createFile($path.$file, "# `$env` environment config goes here"); |
|
51 | 51 | |
52 | 52 | if ($saved) { |
53 | 53 | $output->writeln("<info>$env config was created in $relativePath/$file</info>"); |
@@ -37,8 +37,8 @@ |
||
37 | 37 | $name = ucfirst($input->getArgument('name')); |
38 | 38 | $config = $this->getGlobalConfig(); |
39 | 39 | |
40 | - $path = $this->createDirectoryFor(Configuration::supportDir() . 'Helper', $name); |
|
41 | - $filename = $path . $this->getShortClassName($name) . '.php'; |
|
40 | + $path = $this->createDirectoryFor(Configuration::supportDir().'Helper', $name); |
|
41 | + $filename = $path.$this->getShortClassName($name).'.php'; |
|
42 | 42 | |
43 | 43 | $res = $this->createFile($filename, (new Helper($name, $config['namespace']))->produce()); |
44 | 44 | if ($res) { |
@@ -45,7 +45,7 @@ |
||
45 | 45 | $path = $this->createDirectoryFor($config['path'], $class); |
46 | 46 | |
47 | 47 | $filename = $this->completeSuffix($className, 'Test'); |
48 | - $filename = $path . $filename; |
|
48 | + $filename = $path.$filename; |
|
49 | 49 | |
50 | 50 | $gen = new TestGenerator($config, $class); |
51 | 51 |
@@ -12,8 +12,8 @@ discard block |
||
12 | 12 | $basePath = rtrim($basePath, DIRECTORY_SEPARATOR); |
13 | 13 | if ($className) { |
14 | 14 | $className = str_replace(['/', '\\'], [DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR], $className); |
15 | - $path = $basePath . DIRECTORY_SEPARATOR . $className; |
|
16 | - $basePath = pathinfo($path, PATHINFO_DIRNAME) . DIRECTORY_SEPARATOR; |
|
15 | + $path = $basePath.DIRECTORY_SEPARATOR.$className; |
|
16 | + $basePath = pathinfo($path, PATHINFO_DIRNAME).DIRECTORY_SEPARATOR; |
|
17 | 17 | } |
18 | 18 | if (!file_exists($basePath)) { |
19 | 19 | // Second argument should be mode. Well, umask() doesn't seem to return any if not set. Config may fix this. |
@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | if (strpos(strrev($filename), strrev($suffix)) === 0) { |
28 | 28 | $filename .= '.php'; |
29 | 29 | } |
30 | - if (strpos(strrev($filename), strrev($suffix . '.php')) !== 0) { |
|
31 | - $filename .= $suffix . '.php'; |
|
30 | + if (strpos(strrev($filename), strrev($suffix.'.php')) !== 0) { |
|
31 | + $filename .= $suffix.'.php'; |
|
32 | 32 | } |
33 | 33 | if (strpos(strrev($filename), strrev('.php')) !== 0) { |
34 | 34 | $filename .= '.php'; |