@@ -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; |
@@ -49,10 +49,10 @@ discard block |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | if ($exclude !== null) { |
| 52 | - $cbFilter = function () {return true;}; |
|
| 52 | + $cbFilter = function() {return true; }; |
|
| 53 | 53 | |
| 54 | 54 | if (is_array($exclude) && count($exclude) > 0) { |
| 55 | - $cbFilter = function ($glob) use ($exclude) { |
|
| 55 | + $cbFilter = function($glob) use ($exclude) { |
|
| 56 | 56 | foreach ($exclude as $pattern) { |
| 57 | 57 | if (preg_match($pattern, $glob)) { |
| 58 | 58 | return false; |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | };echo 'a'; |
| 64 | 64 | } elseif (is_string($exclude)) { |
| 65 | 65 | echo 'a'; |
| 66 | - $cbFilter = function ($glob) use ($exclude) { |
|
| 66 | + $cbFilter = function($glob) use ($exclude) { |
|
| 67 | 67 | return !preg_match($exclude, $glob); |
| 68 | 68 | }; |
| 69 | 69 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | return $this; |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | - $streams = array_map(function ($file) { |
|
| 96 | + $streams = array_map(function($file) { |
|
| 97 | 97 | return new Stream(fopen($file, 'r+')); |
| 98 | 98 | }, $this->globs); |
| 99 | 99 | |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | return $this; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | - $streams = array_map(function ($file) { |
|
| 124 | + $streams = array_map(function($file) { |
|
| 125 | 125 | return new Stream(fopen($file, 'r+')); |
| 126 | 126 | }, $this->globs); |
| 127 | 127 | |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | $globs = array_merge($globs, $this->recoursiveGlob($dir.'/'.basename($pattern), $flags)); |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | - $globs = array_filter($globs, function ($res) { |
|
| 218 | + $globs = array_filter($globs, function($res) { |
|
| 219 | 219 | return !is_dir($res); |
| 220 | 220 | }); |
| 221 | 221 | |
@@ -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 | |
@@ -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 | |