update text generate command

This commit is contained in:
crazywhalecc
2023-03-05 11:52:41 +08:00
committed by Jerry
parent 2c38e055f8
commit 8bb4421a70
2 changed files with 4 additions and 2 deletions

View File

@@ -29,6 +29,8 @@
| `\ZM\Annotation\OneBot\CommandArgument` | `CommandArgument` |
| `\ZM\Annotation\OneBot\CommandHelp` | `CommandHelp` |
| `\ZM\Annotation\Closed` | `Closed` |
| `\ZM\Middleware\MiddlewareArgTrait` | `MiddlewareArgTrait` |
| `\ZM\Middleware\Pipeline` | `Pipeline` |
| `\ZM\Plugin\ZMPlugin` | `ZMPlugin` |
| `\ZM\Context\BotContext` | `BotContext` |
| `\ZM\Utils\ZMRequest` | `ZMRequest` |

View File

@@ -63,8 +63,8 @@ class TextGenerateCommand extends Command
LINE;
file_put_contents(
SOURCE_ROOT_DIR . '/docs/components/common/class-alias.md',
$obj . "\n" . '| ' . str_pad('全类名', $full_maxlen) . ' | ' . str_pad('别名', $short_maxlen) . ' |' .
"\n" . '| ' . str_pad('', $full_maxlen, '-') . ' | ' . str_pad('', $short_maxlen, '-') . ' |' .
$obj . "\n" . '| ' . str_pad('全类名 ', $full_maxlen + 6) . ' | ' . str_pad('别名 ', $short_maxlen + 4) . ' |' .
"\n" . '|-' . str_pad('', $full_maxlen, '-') . '-|-' . str_pad('', $short_maxlen, '-') . '-|' .
"\n" . implode("\n", array_map(fn ($v) => '| ' . str_pad('`' . $v[0] . '`', $full_maxlen) . ' | ' . str_pad('`' . $v[1] . '`', $short_maxlen) . ' |', $line)) . "\n"
);
$this->write('成功');