@@ -22,6 +22,9 @@ |
||
22 | 22 | return new JuntyFileNotFound(); |
23 | 23 | } |
24 | 24 | |
25 | + /** |
|
26 | + * @param string $taskName |
|
27 | + */ |
|
25 | 28 | public static function taskNotRegistred($taskName) |
26 | 29 | { |
27 | 30 | return new TaskNotRegistred($taskName); |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Junty |
|
4 | - * |
|
5 | - * @author Gabriel Jacinto aka. GabrielJMJ <[email protected]> |
|
6 | - * @license MIT License |
|
7 | - */ |
|
3 | + * Junty |
|
4 | + * |
|
5 | + * @author Gabriel Jacinto aka. GabrielJMJ <[email protected]> |
|
6 | + * @license MIT License |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace Junty\Stream; |
10 | 10 |
@@ -104,6 +104,9 @@ discard block |
||
104 | 104 | return $this; |
105 | 105 | } |
106 | 106 | |
107 | + /** |
|
108 | + * @return \Closure |
|
109 | + */ |
|
107 | 110 | private function getPipeCallback($cb) : callable |
108 | 111 | { |
109 | 112 | if (!($cb instanceof PluginInterface) && !is_callable($cb)) { |
@@ -130,7 +133,7 @@ discard block |
||
130 | 133 | * |
131 | 134 | * @param string $dest |
132 | 135 | * |
133 | - * @return callable |
|
136 | + * @return ToDirPlugin |
|
134 | 137 | */ |
135 | 138 | public function toDir(string $dest) |
136 | 139 | { |
@@ -9,7 +9,6 @@ |
||
9 | 9 | namespace Junty\Stream; |
10 | 10 | |
11 | 11 | use Psr\Http\Message\StreamInterface; |
12 | -use GuzzleHttp\Psr7; |
|
13 | 12 | use Junty\Stream\Stream; |
14 | 13 | use Junty\Plugin\PluginInterface; |
15 | 14 | use Junty\ToDir\ToDirPlugin; |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Junty |
|
4 | - * |
|
5 | - * @author Gabriel Jacinto aka. GabrielJMJ <[email protected]> |
|
6 | - * @license MIT License |
|
7 | - */ |
|
3 | + * Junty |
|
4 | + * |
|
5 | + * @author Gabriel Jacinto aka. GabrielJMJ <[email protected]> |
|
6 | + * @license MIT License |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace Junty\Stream; |
10 | 10 |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | return $this; |
73 | 73 | } |
74 | 74 | |
75 | - $streams = array_map(function ($file) { |
|
75 | + $streams = array_map(function($file) { |
|
76 | 76 | return new Stream(fopen($file, 'r+')); |
77 | 77 | }, $this->globs); |
78 | 78 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | return $this; |
101 | 101 | } |
102 | 102 | |
103 | - $streams = array_map(function ($file) { |
|
103 | + $streams = array_map(function($file) { |
|
104 | 104 | return new Stream(fopen($file, 'r+')); |
105 | 105 | }, $this->globs); |
106 | 106 | |
@@ -192,20 +192,20 @@ discard block |
||
192 | 192 | |
193 | 193 | foreach ( |
194 | 194 | glob( |
195 | - dirname($pattern) . DIRECTORY_SEPARATOR . '*', |
|
196 | - GLOB_ONLYDIR | GLOB_NOSORT |
|
195 | + dirname($pattern).DIRECTORY_SEPARATOR.'*', |
|
196 | + GLOB_ONLYDIR|GLOB_NOSORT |
|
197 | 197 | ) |
198 | 198 | as $dir |
199 | 199 | ) { |
200 | 200 | $globs = array_merge( |
201 | 201 | $globs, |
202 | 202 | $this->recoursiveGlob( |
203 | - $dir . DIRECTORY_SEPARATOR . basename($pattern), $flags |
|
203 | + $dir.DIRECTORY_SEPARATOR.basename($pattern), $flags |
|
204 | 204 | ) |
205 | 205 | ); |
206 | 206 | } |
207 | 207 | |
208 | - $globs = array_filter($globs, function ($res) { |
|
208 | + $globs = array_filter($globs, function($res) { |
|
209 | 209 | return !is_dir($res); |
210 | 210 | }); |
211 | 211 | |
@@ -223,10 +223,10 @@ discard block |
||
223 | 223 | private function ignoreFiles(array $files, $patterns) |
224 | 224 | { |
225 | 225 | if ($patterns !== null) { |
226 | - $cbFilter = function () {return true;}; |
|
226 | + $cbFilter = function() {return true; }; |
|
227 | 227 | |
228 | 228 | if (is_array($patterns) && count($patterns)) { |
229 | - $cbFilter = function ($glob) use ($patterns) { |
|
229 | + $cbFilter = function($glob) use ($patterns) { |
|
230 | 230 | foreach ($patterns as $pattern) { |
231 | 231 | if (preg_match($pattern, $glob)) { |
232 | 232 | return false; |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | return true; |
237 | 237 | }; |
238 | 238 | } elseif (is_string($patterns)) { |
239 | - $cbFilter = function ($glob) use ($patterns) { |
|
239 | + $cbFilter = function($glob) use ($patterns) { |
|
240 | 240 | return !preg_match($patterns, $glob); |
241 | 241 | }; |
242 | 242 | } |
@@ -12,6 +12,6 @@ |
||
12 | 12 | { |
13 | 13 | public function __construct($task) |
14 | 14 | { |
15 | - parent::__construct((string) $task . ' is not a registred task.'); |
|
15 | + parent::__construct((string) $task.' is not a registred task.'); |
|
16 | 16 | } |
17 | 17 | } |
18 | 18 | \ No newline at end of file |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Junty |
|
4 | - * |
|
5 | - * @author Gabriel Jacinto aka. GabrielJMJ <[email protected]> |
|
6 | - * @license MIT License |
|
7 | - */ |
|
3 | + * Junty |
|
4 | + * |
|
5 | + * @author Gabriel Jacinto aka. GabrielJMJ <[email protected]> |
|
6 | + * @license MIT License |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace Junty\Stream; |
10 | 10 |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Junty |
|
4 | - * |
|
5 | - * @author Gabriel Jacinto aka. GabrielJMJ <[email protected]> |
|
6 | - * @license MIT License |
|
7 | - */ |
|
3 | + * Junty |
|
4 | + * |
|
5 | + * @author Gabriel Jacinto aka. GabrielJMJ <[email protected]> |
|
6 | + * @license MIT License |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace Junty\Stream; |
10 | 10 |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Junty |
|
4 | - * |
|
5 | - * @author Gabriel Jacinto aka. GabrielJMJ <[email protected]> |
|
6 | - * @license MIT License |
|
7 | - */ |
|
3 | + * Junty |
|
4 | + * |
|
5 | + * @author Gabriel Jacinto aka. GabrielJMJ <[email protected]> |
|
6 | + * @license MIT License |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace Junty\Stream; |
10 | 10 |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Junty |
|
4 | - * |
|
5 | - * @author Gabriel Jacinto aka. GabrielJMJ <[email protected]> |
|
6 | - * @license MIT License |
|
7 | - */ |
|
3 | + * Junty |
|
4 | + * |
|
5 | + * @author Gabriel Jacinto aka. GabrielJMJ <[email protected]> |
|
6 | + * @license MIT License |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace Junty\Stream; |
10 | 10 |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Junty |
|
4 | - * |
|
5 | - * @author Gabriel Jacinto aka. GabrielJMJ <[email protected]> |
|
6 | - * @license MIT License |
|
7 | - */ |
|
3 | + * Junty |
|
4 | + * |
|
5 | + * @author Gabriel Jacinto aka. GabrielJMJ <[email protected]> |
|
6 | + * @license MIT License |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace Junty\Stream; |
10 | 10 |