@@ -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; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | return $this; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - $streams = array_map(function ($file) { |
|
| 70 | + $streams = array_map(function($file) { |
|
| 71 | 71 | return new Stream(fopen($file, 'r+')); |
| 72 | 72 | }, $this->globs); |
| 73 | 73 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | return $this; |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | - $streams = array_map(function ($file) { |
|
| 98 | + $streams = array_map(function($file) { |
|
| 99 | 99 | return new Stream(fopen($file, 'r+')); |
| 100 | 100 | }, $this->globs); |
| 101 | 101 | |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | $globs = array_merge($globs, $this->recoursiveGlob($dir.'/'.basename($pattern), $flags)); |
| 172 | 172 | } |
| 173 | 173 | |
| 174 | - $globs = array_filter($globs, function ($res) { |
|
| 174 | + $globs = array_filter($globs, function($res) { |
|
| 175 | 175 | return !is_dir($res); |
| 176 | 176 | }); |
| 177 | 177 | |
@@ -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 | |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | namespace Junty; |
| 10 | 10 | |
| 11 | 11 | use Junty\{TaskInterface, AbstractTask}; |
| 12 | -use Junty\Stream\StreamHandler; |
|
| 13 | 12 | |
| 14 | 13 | class Task extends AbstractTask |
| 15 | 14 | { |
@@ -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 | |
@@ -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 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | protected function execute(InputInterface $input, OutputInterface $output) |
| 38 | 38 | { |
| 39 | 39 | if ($input->hasArgument('task') && $task = $input->getArgument('task') !== null) { |
| 40 | - $output->writeln('Executing task: ' . $task = $input->getArgument('task')); |
|
| 40 | + $output->writeln('Executing task: '.$task = $input->getArgument('task')); |
|
| 41 | 41 | |
| 42 | 42 | $this->runner->runTask($task); |
| 43 | 43 | } else { |
@@ -46,6 +46,6 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | $time = round((microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']) * 100) / 100; |
| 49 | - $output->writeln('Finished! Time: ' . $time . 'ms'); |
|
| 49 | + $output->writeln('Finished! Time: '.$time.'ms'); |
|
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | 52 | \ 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 | |