@@ -6,7 +6,7 @@ |
||
6 | 6 | /** |
7 | 7 | * Executes shell command |
8 | 8 | * |
9 | - * @param string|\Robo\Contract\CommandInterface $command |
|
9 | + * @param string $command |
|
10 | 10 | * |
11 | 11 | * @return \Robo\Result |
12 | 12 | */ |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | protected $run = ''; |
48 | 48 | |
49 | 49 | /** |
50 | - * @param string|\Robo\Result $cidOrResult |
|
50 | + * @param string $cidOrResult |
|
51 | 51 | */ |
52 | 52 | public function __construct($cidOrResult) |
53 | 53 | { |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | - * @param string|\Robo\Contract\CommandInterface $command |
|
76 | + * @param string $command |
|
77 | 77 | * |
78 | 78 | * @return $this |
79 | 79 | */ |
@@ -88,6 +88,6 @@ |
||
88 | 88 | */ |
89 | 89 | public function getCommand() |
90 | 90 | { |
91 | - return $this->command . ' ' . $this->arguments . ' ' . $this->cid.' '.$this->run; |
|
91 | + return $this->command . ' ' . $this->arguments . ' ' . $this->cid . ' ' . $this->run; |
|
92 | 92 | } |
93 | 93 | } |
@@ -124,7 +124,7 @@ |
||
124 | 124 | } |
125 | 125 | |
126 | 126 | /** |
127 | - * @param string|\Robo\Contract\CommandInterface $run |
|
127 | + * @param string $run |
|
128 | 128 | * |
129 | 129 | * @return $this |
130 | 130 | */ |
@@ -198,7 +198,7 @@ |
||
198 | 198 | } |
199 | 199 | |
200 | 200 | /** |
201 | - * @param array $dirs |
|
201 | + * @param string[] $dirs |
|
202 | 202 | * |
203 | 203 | * @return array|\Robo\Result |
204 | 204 | * |
@@ -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; |
@@ -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); |
@@ -48,7 +48,7 @@ |
||
48 | 48 | * @param string $type |
49 | 49 | * Allowed values: "file", "dir", "fileAndDir". |
50 | 50 | * |
51 | - * @return bool |
|
51 | + * @return boolean|null |
|
52 | 52 | */ |
53 | 53 | protected function checkResource($resource, $type) |
54 | 54 | { |
@@ -353,7 +353,7 @@ |
||
353 | 353 | } |
354 | 354 | |
355 | 355 | /** |
356 | - * @param array|string $pattern |
|
356 | + * @param string[] $pattern |
|
357 | 357 | * |
358 | 358 | * @return $this |
359 | 359 | */ |
@@ -1,7 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -use AspectMock\Test as test; |
|
4 | - |
|
5 | 3 | class HgTest extends \Codeception\TestCase\Test |
6 | 4 | { |
7 | 5 | /** |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | * |
152 | 152 | * @param string $cmd |
153 | 153 | * |
154 | - * @return bool|string |
|
154 | + * @return string|false |
|
155 | 155 | */ |
156 | 156 | protected function findExecutable($cmd) |
157 | 157 | { |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | } |
181 | 181 | |
182 | 182 | /** |
183 | - * @return bool|string |
|
183 | + * @return string|false |
|
184 | 184 | */ |
185 | 185 | protected function findProjectBin() |
186 | 186 | { |
@@ -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. |
@@ -79,7 +79,7 @@ |
||
79 | 79 | * |
80 | 80 | * @covers ::args |
81 | 81 | * |
82 | - * @param string $expected |
|
82 | + * @param string $expectedLinux |
|
83 | 83 | * @param array $args |
84 | 84 | */ |
85 | 85 | public function testArgs($expectedLinux, $expectedWindows, $args) |