@@ -2,7 +2,6 @@ |
||
| 2 | 2 | namespace Wandu\Compiler; |
| 3 | 3 | |
| 4 | 4 | use Closure; |
| 5 | -use Wandu\Compiler\Exception\UnknownTokenException; |
|
| 6 | 5 | use Wandu\Compiler\Exception\UnknownTokenFromLexException; |
| 7 | 6 | |
| 8 | 7 | /** |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | |
| 4 | 4 | use Psy\Shell; |
| 5 | 5 | use Wandu\Console\Command; |
| 6 | -use Wandu\Q\Queue; |
|
| 7 | 6 | |
| 8 | 7 | class PsyshCommand extends Command |
| 9 | 8 | { |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |
| 54 | - * @param \Exception|\Throwable $exception |
|
| 54 | + * @param ErrorException $exception |
|
| 55 | 55 | * @return int |
| 56 | 56 | */ |
| 57 | 57 | public function handleException($exception) |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | /** |
| 112 | - * @param mixed $method |
|
| 112 | + * @param string|null $method |
|
| 113 | 113 | * @return string |
| 114 | 114 | */ |
| 115 | 115 | protected function filterMethod($method) |
@@ -80,6 +80,11 @@ discard block |
||
| 80 | 80 | $this->output->writeln("<info>Install Complete!</info>"); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | + /** |
|
| 84 | + * @param string $appBasePath |
|
| 85 | + * @param string $appNamespace |
|
| 86 | + * @param string $path |
|
| 87 | + */ |
|
| 83 | 88 | protected function install($appBasePath, $appNamespace, $path) |
| 84 | 89 | { |
| 85 | 90 | $installer = new SkeletonBuilder($appBasePath, __DIR__ . '/../skeleton'); |
@@ -99,6 +104,9 @@ discard block |
||
| 99 | 104 | ); |
| 100 | 105 | } |
| 101 | 106 | |
| 107 | + /** |
|
| 108 | + * @param string $composerFile |
|
| 109 | + */ |
|
| 102 | 110 | protected function runDumpAutoload($composerFile) |
| 103 | 111 | { |
| 104 | 112 | $basePath = dirname($composerFile); |
@@ -111,6 +119,10 @@ discard block |
||
| 111 | 119 | (new Process("{$composer} dump-autoload", $basePath))->run(); |
| 112 | 120 | } |
| 113 | 121 | |
| 122 | + /** |
|
| 123 | + * @param string $appNamespace |
|
| 124 | + * @param string $composerFile |
|
| 125 | + */ |
|
| 114 | 126 | protected function saveAutoloadToComposer($appNamespace, $composerFile, $path = '') |
| 115 | 127 | { |
| 116 | 128 | $this->output->write("save autoload setting to composer... "); |
@@ -137,6 +149,10 @@ discard block |
||
| 137 | 149 | $this->output->writeln("<info>ok</info>"); |
| 138 | 150 | } |
| 139 | 151 | |
| 152 | + /** |
|
| 153 | + * @param string $message |
|
| 154 | + * @param string $default |
|
| 155 | + */ |
|
| 140 | 156 | protected function askAppNamespace($message, $default) |
| 141 | 157 | { |
| 142 | 158 | return $this->io->ask($message, $default, function ($namespace) { |
@@ -144,6 +160,10 @@ discard block |
||
| 144 | 160 | }); |
| 145 | 161 | } |
| 146 | 162 | |
| 163 | + /** |
|
| 164 | + * @param string $message |
|
| 165 | + * @param string $default |
|
| 166 | + */ |
|
| 147 | 167 | protected function askAppBasePath($message, $default) |
| 148 | 168 | { |
| 149 | 169 | $appBasePath = $this->io->ask($message, $default); |
@@ -136,6 +136,9 @@ discard block |
||
| 136 | 136 | return $validator; |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | + /** |
|
| 140 | + * @param string $pattern |
|
| 141 | + */ |
|
| 139 | 142 | protected function getMethodAndParams($pattern) |
| 140 | 143 | { |
| 141 | 144 | if (false === $pivot = strpos($pattern, ':')) { |
@@ -144,6 +147,10 @@ discard block |
||
| 144 | 147 | $method = substr($pattern, 0, $pivot); |
| 145 | 148 | $params = array_reduce( |
| 146 | 149 | explode(',', substr($pattern, $pivot + 1)), |
| 150 | + |
|
| 151 | + /** |
|
| 152 | + * @param string $carry |
|
| 153 | + */ |
|
| 147 | 154 | function ($carry, $value) { |
| 148 | 155 | $value = trim($value); |
| 149 | 156 | if ($value) { |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | /** |
| 126 | - * @param string|callable|\Wandu\Database\Contracts\QueryInterface $query |
|
| 126 | + * @param callable $query |
|
| 127 | 127 | * @param array $bindings |
| 128 | 128 | * @return \PDOStatement |
| 129 | 129 | */ |
@@ -359,7 +359,7 @@ |
||
| 359 | 359 | } |
| 360 | 360 | |
| 361 | 361 | /** |
| 362 | - * @param string|\Wandu\Database\Contracts\ExpressionInterface $name |
|
| 362 | + * @param string $name |
|
| 363 | 363 | * @param string $type |
| 364 | 364 | * @param array $attributes |
| 365 | 365 | * @return \Wandu\Database\Query\Expression\ColumnExpression|\Wandu\Database\Contracts\ExpressionInterface |
@@ -52,6 +52,12 @@ |
||
| 52 | 52 | return $this; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | + /** |
|
| 56 | + * @param string $logicalOp |
|
| 57 | + * @param callable $name |
|
| 58 | + * @param string $operator |
|
| 59 | + * @param string $value |
|
| 60 | + */ |
|
| 55 | 61 | protected function addWhereQuery($logicalOp, $name, $operator = null, $value = null) |
| 56 | 62 | { |
| 57 | 63 | if (!is_string($name) && is_callable($name)) { |