@@ -11,7 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | public function _before(CliGuy $I) |
13 | 13 | { |
14 | - $I->amInPath(codecept_data_dir().'sandbox'); |
|
14 | + $I->amInPath(codecept_data_dir() . 'sandbox'); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | public function toSimulateDirCreation(CliGuy $I) |
@@ -11,10 +11,10 @@ discard block |
||
11 | 11 | { |
12 | 12 | $I->wantTo('write lines with WriteToFile task'); |
13 | 13 | $I->taskWriteToFile('blogpost.md') |
14 | - ->line('****') |
|
15 | - ->line('hello world') |
|
16 | - ->line('****') |
|
17 | - ->run(); |
|
14 | + ->line('****') |
|
15 | + ->line('hello world') |
|
16 | + ->line('****') |
|
17 | + ->run(); |
|
18 | 18 | $I->seeFileFound('blogpost.md'); |
19 | 19 | $I->seeFileContentsEqual(<<<HERE |
20 | 20 | **** |
@@ -28,9 +28,9 @@ discard block |
||
28 | 28 | public function appendToFile(CliGuy $I) |
29 | 29 | { |
30 | 30 | $I->taskWriteToFile('a.txt') |
31 | - ->append() |
|
32 | - ->line('hello world') |
|
33 | - ->run(); |
|
31 | + ->append() |
|
32 | + ->line('hello world') |
|
33 | + ->run(); |
|
34 | 34 | $I->seeFileFound('a.txt'); |
35 | 35 | $I->seeFileContentsEqual(<<<HERE |
36 | 36 | Ahello world |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | public function testWouldChange(CliGuy $I) |
43 | 43 | { |
44 | 44 | $writeTask = $I->taskWriteToFile('a.txt') |
45 | - ->append(); |
|
45 | + ->append(); |
|
46 | 46 | $I->assertEquals(false, $writeTask->wouldChange(), "No changes to test file."); |
47 | 47 | $writeTask->line('hello world'); |
48 | 48 | $I->assertEquals(true, $writeTask->wouldChange(), "Test file would change."); |
@@ -68,15 +68,15 @@ discard block |
||
68 | 68 | { |
69 | 69 | $I->wantTo('append lines with WriteToFile task, but only if pattern does not match'); |
70 | 70 | $I->taskWriteToFile('blogpost.md') |
71 | - ->line('****') |
|
72 | - ->line('hello world') |
|
73 | - ->line('****') |
|
74 | - ->appendUnlessMatches('/hello/', 'Should not add this') |
|
75 | - ->appendUnlessMatches('/goodbye/', 'Should add this') |
|
76 | - ->appendIfMatches('/hello/', ' and should also add this') |
|
77 | - ->appendIfMatches('/goodbye/', ' but should not add this') |
|
78 | - ->appendIfMatches('/should/', '!') |
|
79 | - ->run(); |
|
71 | + ->line('****') |
|
72 | + ->line('hello world') |
|
73 | + ->line('****') |
|
74 | + ->appendUnlessMatches('/hello/', 'Should not add this') |
|
75 | + ->appendUnlessMatches('/goodbye/', 'Should add this') |
|
76 | + ->appendIfMatches('/hello/', ' and should also add this') |
|
77 | + ->appendIfMatches('/goodbye/', ' but should not add this') |
|
78 | + ->appendIfMatches('/should/', '!') |
|
79 | + ->run(); |
|
80 | 80 | $I->seeFileFound('blogpost.md'); |
81 | 81 | $I->seeFileContentsEqual(<<<HERE |
82 | 82 | **** |
@@ -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) |
@@ -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 | } |
@@ -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 | */ |
@@ -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 | */ |