@@ -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 |
@@ -11,8 +11,8 @@ |
||
11 | 11 | $initialFileSize = filesize($sampleCss); |
12 | 12 | |
13 | 13 | $I->taskMinify($sampleCss) |
14 | - ->to('minifiedSample.css') |
|
15 | - ->run(); |
|
14 | + ->to('minifiedSample.css') |
|
15 | + ->run(); |
|
16 | 16 | |
17 | 17 | $I->seeFileFound($outputCss); |
18 | 18 | $minifiedFileSize = filesize($outputCss); |
@@ -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(); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | public function __construct($roboClass = null, $roboFile = null) |
45 | 45 | { |
46 | 46 | // set the const as class properties to allow overwriting in child classes |
47 | - $this->roboClass = $roboClass ? $roboClass : self::ROBOCLASS ; |
|
47 | + $this->roboClass = $roboClass ? $roboClass : self::ROBOCLASS; |
|
48 | 48 | $this->roboFile = $roboFile ? $roboFile : self::ROBOFILE; |
49 | 49 | $this->dir = getcwd(); |
50 | 50 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | require_once $roboFilePath; |
80 | 80 | |
81 | 81 | if (!class_exists($this->roboClass)) { |
82 | - $output->writeln("<error>Class ".$this->roboClass." was not loaded</error>"); |
|
82 | + $output->writeln("<error>Class " . $this->roboClass . " was not loaded</error>"); |
|
83 | 83 | return false; |
84 | 84 | } |
85 | 85 | return true; |
@@ -298,9 +298,9 @@ discard block |
||
298 | 298 | |
299 | 299 | if (substr($argv[$pos], 0, 12) == '--load-from=') { |
300 | 300 | $this->dir = substr($argv[$pos], 12); |
301 | - } elseif (isset($argv[$pos +1])) { |
|
302 | - $this->dir = $argv[$pos +1]; |
|
303 | - unset($argv[$pos +1]); |
|
301 | + } elseif (isset($argv[$pos + 1])) { |
|
302 | + $this->dir = $argv[$pos + 1]; |
|
303 | + unset($argv[$pos + 1]); |
|
304 | 304 | } |
305 | 305 | unset($argv[$pos]); |
306 | 306 | // Make adjustments if '--load-from' points at a file. |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
95 | - * @param array $argv |
|
95 | + * @param string[] $argv |
|
96 | 96 | * @param null|string $appName |
97 | 97 | * @param null|string $appVersion |
98 | 98 | * @param null|\Symfony\Component\Console\Output\OutputInterface $output |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | * @param null|\Symfony\Component\Console\Input\InputInterface $input |
116 | 116 | * @param null|\Symfony\Component\Console\Output\OutputInterface $output |
117 | 117 | * @param null|\Robo\Application $app |
118 | - * @param array[] $commandFiles |
|
118 | + * @param null|string $commandFiles |
|
119 | 119 | * |
120 | 120 | * @return int |
121 | 121 | */ |
@@ -44,7 +44,7 @@ |
||
44 | 44 | * @param string $resource File or folder. |
45 | 45 | * @param string $type "file", "dir", "fileAndDir" |
46 | 46 | * |
47 | - * @return bool |
|
47 | + * @return boolean|null |
|
48 | 48 | */ |
49 | 49 | protected function checkResource($resource, $type) |
50 | 50 | { |
@@ -90,25 +90,25 @@ |
||
90 | 90 | $this->checkResources($targets); |
91 | 91 | } |
92 | 92 | |
93 | - /** |
|
94 | - * Wrapper method around phps is_dir() |
|
95 | - * |
|
96 | - * @param string $directory |
|
97 | - * |
|
98 | - * @return bool |
|
99 | - */ |
|
93 | + /** |
|
94 | + * Wrapper method around phps is_dir() |
|
95 | + * |
|
96 | + * @param string $directory |
|
97 | + * |
|
98 | + * @return bool |
|
99 | + */ |
|
100 | 100 | protected function isDir($directory) |
101 | 101 | { |
102 | 102 | return is_dir($directory); |
103 | 103 | } |
104 | 104 | |
105 | - /** |
|
106 | - * Wrapper method around phps file_exists() |
|
107 | - * |
|
108 | - * @param string $file |
|
109 | - * |
|
110 | - * @return bool |
|
111 | - */ |
|
105 | + /** |
|
106 | + * Wrapper method around phps file_exists() |
|
107 | + * |
|
108 | + * @param string $file |
|
109 | + * |
|
110 | + * @return bool |
|
111 | + */ |
|
112 | 112 | protected function isFile($file) |
113 | 113 | { |
114 | 114 | return file_exists($file); |
@@ -167,7 +167,7 @@ |
||
167 | 167 | } |
168 | 168 | |
169 | 169 | /** |
170 | - * @param $inProgress |
|
170 | + * @param boolean $inProgress |
|
171 | 171 | */ |
172 | 172 | protected function showTaskProgress($inProgress) |
173 | 173 | { |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | /** |
122 | - * @param array|string|Traversable $src one or more source values |
|
122 | + * @param string $src one or more source values |
|
123 | 123 | * |
124 | 124 | * @return $this |
125 | 125 | */ |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | } |
144 | 144 | |
145 | 145 | /** |
146 | - * @param array|string $exts one or more extensions |
|
146 | + * @param string $exts one or more extensions |
|
147 | 147 | * |
148 | 148 | * @return $this |
149 | 149 | */ |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | } |
155 | 155 | |
156 | 156 | /** |
157 | - * @param array|string $exclude one or more exclusions |
|
157 | + * @param string[] $exclude one or more exclusions |
|
158 | 158 | * |
159 | 159 | * @return $this |
160 | 160 | */ |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | } |
168 | 168 | |
169 | 169 | /** |
170 | - * @param array|string|Traversable $path one or more skip-doc-path values |
|
170 | + * @param \SplDoublyLinkedList $path one or more skip-doc-path values |
|
171 | 171 | * |
172 | 172 | * @return $this |
173 | 173 | */ |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | } |
194 | 194 | |
195 | 195 | /** |
196 | - * @param array|string $charset one or more charsets |
|
196 | + * @param string[] $charset one or more charsets |
|
197 | 197 | * |
198 | 198 | * @return $this |
199 | 199 | */ |
@@ -71,7 +71,7 @@ |
||
71 | 71 | if (!is_array($args)) { |
72 | 72 | $args = func_get_args(); |
73 | 73 | } |
74 | - $args = array_map(function ($arg) { |
|
74 | + $args = array_map(function($arg) { |
|
75 | 75 | if (preg_match('/^\w+$/', trim($arg)) === 1) { |
76 | 76 | $this->operation = $arg; |
77 | 77 | return null; |
@@ -206,7 +206,7 @@ |
||
206 | 206 | /** |
207 | 207 | * @param string $filename |
208 | 208 | * |
209 | - * @return bool|string |
|
209 | + * @return string|false |
|
210 | 210 | */ |
211 | 211 | protected static function archiveType($filename) |
212 | 212 | { |
@@ -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 | } |