Skip to content

Commit

Permalink
breaking: migrate commands to inhere/console v4.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Nov 29, 2021
1 parent aa708b9 commit e231f0f
Show file tree
Hide file tree
Showing 38 changed files with 76 additions and 76 deletions.
2 changes: 1 addition & 1 deletion app/Console/Attach/Gitlab/ProjectInit.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
class ProjectInit extends Command
{
protected static $name = 'pinit';
protected static string $name = 'pinit';

protected function configure(): void
{
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Command/CheatCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class CheatCommand extends Command
{
public const CHT_HOST = 'https://cht.sh/';

protected static $name = 'cheat';
protected static string $name = 'cheat';

protected static $desc = 'Query cheat for development';
protected static string $desc = 'Query cheat for development';

/**
* @return string[]
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Command/DemoCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/
class DemoCommand extends Command
{
protected static $name = 'demo1';
protected static string $name = 'demo1';

protected static $desc = 'a test command';
protected static string $desc = 'a test command';

public static function isEnabled(): bool
{
Expand Down
6 changes: 3 additions & 3 deletions app/Console/Command/DocCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
*/
class DocCommand extends Command
{
protected static $name = 'doc';
protected static string $name = 'doc';

protected static $desc = 'Useful documents for how to use git,tmux and more tool';
protected static string $desc = 'Useful documents for how to use git,tmux and more tool';

/**
* @var string
Expand Down Expand Up @@ -115,7 +115,7 @@ private function prepareManDoc(): Document
* @param Input $input
* @param Output $output
*/
protected function execute(Input $input, Output $output)
protected function execute(Input $input, Output $output): void
{
$man = $this->prepareManDoc();
if ($errPaths = $man->getErrorPaths()) {
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Command/EnvCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
*/
class EnvCommand extends Command
{
protected static $name = 'env';
protected static string $name = 'env';

protected static $desc = 'a test command';
protected static string $desc = 'a test command';

/**
* print system ENV information
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Command/ExprCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
*/
class ExprCommand extends Command
{
protected static $name = 'expr';
protected static string $name = 'expr';

protected static $desc = 'Use for expression calculation';
protected static string $desc = 'Use for expression calculation';

public const RESULT_VAR = 'ret';

Expand Down
4 changes: 2 additions & 2 deletions app/Console/Command/FindCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
*/
class FindCommand extends Command
{
protected static $name = 'find';
protected static string $name = 'find';

protected static $desc = 'find file name, contents by grep,find command';
protected static string $desc = 'find file name, contents by grep,find command';

public static function aliases(): array
{
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Command/InitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
*/
class InitCommand extends Command
{
protected static $name = 'init';
protected static string $name = 'init';

protected static $desc = 'initialize kite on the system';
protected static string $desc = 'initialize kite on the system';

/**
* @options
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Command/Json5Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
*/
class Json5Command extends Command
{
protected static $name = 'json5';
protected static string $name = 'json5';

protected static $desc = 'read and convert json5 file to json format';
protected static string $desc = 'read and convert json5 file to json format';

public static function aliases(): array
{
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Command/MarkdownCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
class MarkdownCommand extends Command
{
/** @var string */
protected static $name = 'markdown';
protected static string $name = 'markdown';

/**
* @var string
*/
protected static $desc = 'render markdown file on terminal';
protected static string $desc = 'render markdown file on terminal';

/**
* @return string[]
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Command/RunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
*/
class RunCommand extends Command
{
protected static $name = 'run';
protected static string $name = 'run';

protected static $desc = 'run an script command or script file or kite plugin';
protected static string $desc = 'run an script command or script file or kite plugin';

/**
* @var ScriptRunner
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Command/SearchCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/
class SearchCommand extends Command
{
protected static $name = 'search';
protected static string $name = 'search';

protected static $desc = 'Search by web search engine, such as google, baidu, bing';
protected static string $desc = 'Search by web search engine, such as google, baidu, bing';

private array $engines = [
'google' => 'https://www.google.com/search?q=',
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/ConvertController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
*/
class ConvertController extends Controller
{
protected static $name = 'convert';
protected static string $name = 'convert';

protected static $desc = 'Some useful convert development tool commands';
protected static string $desc = 'Some useful convert development tool commands';

/**
* @return string[]
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/CronTabController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
*/
class CronTabController extends Controller
{
protected static $name = 'crontab';
protected static string $name = 'crontab';

protected static $desc = 'parse or convert crontab expression';
protected static string $desc = 'parse or convert crontab expression';

public static function aliases(): array
{
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/DbController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
*/
class DbController extends Controller
{
protected static $name = 'db';
protected static string $name = 'db';

protected static $desc = 'Database development tool commands';
protected static string $desc = 'Database development tool commands';

/**
* convert an mysql table create SQL to markdown table
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/DemoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/
class DemoController extends Controller
{
protected static $name = 'demo';
protected static string $name = 'demo';

protected static $desc = 'Some useful development tool commands';
protected static string $desc = 'Some useful development tool commands';

public static function isEnabled(): bool
{
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/FsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
*/
class FsController extends Controller
{
protected static $name = 'fs';
protected static string $name = 'fs';

protected static $desc = 'Some useful development tool commands';
protected static string $desc = 'Some useful development tool commands';

public static function aliases(): array
{
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/GenerateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
*/
class GenerateController extends Controller
{
protected static $name = 'gen';
protected static string $name = 'gen';

protected static $desc = 'quick generate new class or file from template';
protected static string $desc = 'quick generate new class or file from template';

public static function aliases(): array
{
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/GitController.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
*/
class GitController extends Controller
{
protected static $name = 'git';
protected static string $name = 'git';

protected static $desc = 'Provide useful tool commands for quick use git';
protected static string $desc = 'Provide useful tool commands for quick use git';

/**
* @var DataObject
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/GitFlowController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
*/
class GitFlowController extends Controller
{
protected static $name = 'gitflow';
protected static string $name = 'gitflow';

protected static $desc = 'Some useful tool commands for git flow development';
protected static string $desc = 'Some useful tool commands for git flow development';

/**
* @var array
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/GitHubController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
*/
class GitHubController extends Controller
{
protected static $name = 'github';
protected static string $name = 'github';

protected static $desc = 'Some useful development tool commands';
protected static string $desc = 'Some useful development tool commands';

/**
* @var array
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/GitLabController.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
*/
class GitLabController extends Controller
{
protected static $name = 'gitlab';
protected static string $name = 'gitlab';

protected static $desc = 'Some useful tool commands for gitlab development';
protected static string $desc = 'Some useful tool commands for gitlab development';

/**
* @var array
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/GitSubtreeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class GitSubtreeController extends Controller
public const TYPE_SSL = 'git@github.com:';
public const TYPE_HTTPS = 'https://github.com/';

protected static $name = 'git-sub';
protected static $desc = 'quick the git subtree tool';
protected static string $name = 'git-sub';
protected static string $desc = 'quick the git subtree tool';

/**
* @var string
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/GoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
*/
class GoController extends Controller
{
protected static $name = 'go';
protected static string $name = 'go';

protected static $desc = 'Some useful tool commands for go development';
protected static string $desc = 'Some useful tool commands for go development';

protected static function commandAliases(): array
{
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/JavaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
*/
class JavaController extends Controller
{
protected static $name = 'java';
protected static string $name = 'java';

protected static $desc = 'Some useful tool commands for java development';
protected static string $desc = 'Some useful tool commands for java development';

protected static function commandAliases(): array
{
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/JsonController.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
*/
class JsonController extends Controller
{
protected static $name = 'json';
protected static string $name = 'json';

protected static $desc = 'Some useful json development tool commands';
protected static string $desc = 'Some useful json development tool commands';

/**
* @var string
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/JumpController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
*/
class JumpController extends Controller
{
protected static $name = 'jump';
protected static string $name = 'jump';

protected static $desc = 'Jump helps you navigate faster by your history.';
protected static string $desc = 'Jump helps you navigate faster by your history.';

/**
* @return string[]
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/K8sController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
*/
class K8sController extends Controller
{
protected static $name = 'k8s';
protected static string $name = 'k8s';

protected static $desc = 'Kubernetes development tool commands';
protected static string $desc = 'Kubernetes development tool commands';

/**
* generate apply template contents for k8s
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/PhpController.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
*/
class PhpController extends Controller
{
protected static $name = 'php';
protected static string $name = 'php';

protected static $desc = 'Some useful tool commands for php development';
protected static string $desc = 'Some useful tool commands for php development';

protected static function commandAliases(): array
{
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/PluginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
*/
class PluginController extends Controller
{
protected static $name = 'plugin';
protected static string $name = 'plugin';

protected static $desc = 'kite plugins manage tools';
protected static string $desc = 'kite plugins manage tools';

/**
* @return string[]
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/ProjectController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
*/
class ProjectController extends Controller
{
protected static $name = 'new';
protected static string $name = 'new';

protected static $desc = 'quick create new project or package or library tool commands';
protected static string $desc = 'quick create new project or package or library tool commands';

public static function aliases(): array
{
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/SelfController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
*/
class SelfController extends Controller
{
protected static $name = 'self';
protected static string $name = 'self';

protected static $desc = 'Operate and manage kite self commands';
protected static string $desc = 'Operate and manage kite self commands';

/**
* @var string
Expand Down

0 comments on commit e231f0f

Please sign in to comment.