@@ -2,7 +2,7 @@ |
||
| 2 | 2 | $I = new CliGuy($scenario); |
| 3 | 3 | |
| 4 | 4 | $I->wantTo('flatten dir with FlattenDir task'); |
| 5 | -$I->amInPath(codecept_data_dir().'sandbox'); |
|
| 5 | +$I->amInPath(codecept_data_dir() . 'sandbox'); |
|
| 6 | 6 | $I->taskFlattenDir([ |
| 7 | 7 | 'some/deeply/nested/*.re' => 'flattened', |
| 8 | 8 | '*.txt' => 'flattened' |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | $I = new CliGuy($scenario); |
| 3 | 3 | |
| 4 | 4 | $I->wantTo('copy dir with CopyDir task'); |
| 5 | -$I->amInPath(codecept_data_dir().'sandbox'); |
|
| 5 | +$I->amInPath(codecept_data_dir() . 'sandbox'); |
|
| 6 | 6 | $I->taskCopyDir(['box' => 'bin']) |
| 7 | 7 | ->run(); |
| 8 | 8 | $I->seeDirFound('bin'); |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | { |
| 5 | 5 | public function _before(CliGuy $I) |
| 6 | 6 | { |
| 7 | - $I->amInPath(codecept_data_dir().'sandbox'); |
|
| 7 | + $I->amInPath(codecept_data_dir() . 'sandbox'); |
|
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | public function toCreateDir(CliGuy $I) |
@@ -8,6 +8,6 @@ |
||
| 8 | 8 | ->run(); |
| 9 | 9 | $I->dontSeeFileFound('box', 'sandbox'); |
| 10 | 10 | $I->dontSeeFileFound('robo.txt', 'sandbox'); |
| 11 | -$I->dontSeeFileFound('a.txt' , 'sandbox'); |
|
| 11 | +$I->dontSeeFileFound('a.txt', 'sandbox'); |
|
| 12 | 12 | |
| 13 | 13 | |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | $I = new CliGuy($scenario); |
| 4 | 4 | |
| 5 | 5 | $I->wantTo('minify a css file'); |
| 6 | -$I->amInPath(codecept_data_dir().'sandbox'); |
|
| 6 | +$I->amInPath(codecept_data_dir() . 'sandbox'); |
|
| 7 | 7 | |
| 8 | 8 | $sampleCss = dirname(__DIR__) . '/_data/sample.css'; |
| 9 | 9 | $outputCss = 'minifiedSample.css'; |
@@ -2,9 +2,9 @@ |
||
| 2 | 2 | $I = new CliGuy($scenario); |
| 3 | 3 | |
| 4 | 4 | $I->wantTo('flatten dir with FlattenDir task including parents'); |
| 5 | -$I->amInPath(codecept_data_dir().'sandbox'); |
|
| 5 | +$I->amInPath(codecept_data_dir() . 'sandbox'); |
|
| 6 | 6 | $I->taskFlattenDir('some/deeply/nested/*.re') |
| 7 | - ->includeParents(array(1,1)) |
|
| 7 | + ->includeParents(array(1, 1)) |
|
| 8 | 8 | ->parentDir('some') |
| 9 | 9 | ->to('flattened') |
| 10 | 10 | ->run(); |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | protected function findProjectBin() |
| 90 | 90 | { |
| 91 | 91 | $cwd = getcwd(); |
| 92 | - $candidates = [ __DIR__ . '/../../vendor/bin', __DIR__ . '/../../bin', $cwd . '/vendor/bin' ]; |
|
| 92 | + $candidates = [__DIR__ . '/../../vendor/bin', __DIR__ . '/../../bin', $cwd . '/vendor/bin']; |
|
| 93 | 93 | |
| 94 | 94 | // If this project is inside a vendor directory, give highest priority |
| 95 | 95 | // to that directory. |
@@ -274,6 +274,6 @@ |
||
| 274 | 274 | */ |
| 275 | 275 | protected static function getTmpDir() |
| 276 | 276 | { |
| 277 | - return getcwd().'/tmp'.rand().time(); |
|
| 277 | + return getcwd() . '/tmp' . rand() . time(); |
|
| 278 | 278 | } |
| 279 | 279 | } |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | public function dirPermissions($permission) |
| 129 | 129 | { |
| 130 | - $this->chmod = (int) $permission; |
|
| 130 | + $this->chmod = (int)$permission; |
|
| 131 | 131 | |
| 132 | 132 | return $this; |
| 133 | 133 | } |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | { |
| 177 | 177 | if (!$this->fs->isAbsolutePath($dir)) { |
| 178 | 178 | // attach the relative path to current working directory |
| 179 | - $dir = getcwd().'/'.$dir; |
|
| 179 | + $dir = getcwd() . '/' . $dir; |
|
| 180 | 180 | } |
| 181 | 181 | $this->parentDir = $dir; |
| 182 | 182 | |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | } catch (\InvalidArgumentException $e) { |
| 231 | 231 | // if finder cannot handle it, try with in()->name() |
| 232 | 232 | if (strpos($dir, '/') === false) { |
| 233 | - $dir = './'.$dir; |
|
| 233 | + $dir = './' . $dir; |
|
| 234 | 234 | } |
| 235 | 235 | $parts = explode('/', $dir); |
| 236 | 236 | $new_dir = implode('/', array_slice($parts, 0, -1)); |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | */ |
| 261 | 261 | protected function getTarget($file, $to) |
| 262 | 262 | { |
| 263 | - $target = $to.'/'.basename($file); |
|
| 263 | + $target = $to . '/' . basename($file); |
|
| 264 | 264 | if ($this->parents !== array(0, 0)) { |
| 265 | 265 | // if the parent is set, create additional directories inside target |
| 266 | 266 | // get relative path to parentDir |
@@ -268,10 +268,10 @@ discard block |
||
| 268 | 268 | // get top parents and bottom parents |
| 269 | 269 | $parts = explode('/', rtrim($rel_path, '/')); |
| 270 | 270 | $prefix_dir = ''; |
| 271 | - $prefix_dir .= ($this->parents[0] > 0 ? implode('/', array_slice($parts, 0, $this->parents[0])).'/' : ''); |
|
| 271 | + $prefix_dir .= ($this->parents[0] > 0 ? implode('/', array_slice($parts, 0, $this->parents[0])) . '/' : ''); |
|
| 272 | 272 | $prefix_dir .= ($this->parents[1] > 0 ? implode('/', array_slice($parts, (0 - $this->parents[1]), $this->parents[1])) : ''); |
| 273 | 273 | $prefix_dir = rtrim($prefix_dir, '/'); |
| 274 | - $target = $to.'/'.$prefix_dir.'/'.basename($file); |
|
| 274 | + $target = $to . '/' . $prefix_dir . '/' . basename($file); |
|
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | return $target; |