1313namespace Laravel \Ripple \Built ;
1414
1515use Laravel \Ripple \Inspector \Client ;
16- use Revolt \EventLoop \UnsupportedFeatureException ;
17- use Ripple \Utils \Output ;
16+ use Ripple \Runtime \Support \Stdin ;
1817use Symfony \Component \Console \Input \InputInterface ;
1918use Symfony \Component \Console \Output \OutputInterface ;
2019
@@ -26,7 +25,6 @@ class Command extends \Illuminate\Console\Command
2625{
2726 /**
2827 * the name and signature of the console command.
29- *
3028 * @var string
3129 */
3230 protected $ signature = 'ripple:server
@@ -41,9 +39,8 @@ class Command extends \Illuminate\Console\Command
4139 protected $ description = 'start the ripple service ' ;
4240
4341 /**
44- * @param InputInterface $input
42+ * @param InputInterface $input
4543 * @param OutputInterface $output
46- *
4744 * @return void
4845 */
4946 public function initialize (InputInterface $ input , OutputInterface $ output ): void
@@ -53,58 +50,55 @@ public function initialize(InputInterface $input, OutputInterface $output): void
5350
5451 /**
5552 * 运行服务
56- *
5753 * @param Client $client
58- *
5954 * @return void
60- * @throws UnsupportedFeatureException
6155 */
6256 public function handle (Client $ client ): void
6357 {
6458 switch ($ this ->argument ('action ' )) {
6559 case 'start ' :
6660 if ($ client ->serverIsRunning ()) {
67- Output:: warning ('the server is already running ' );
61+ Stdin:: println ('the server is already running ' );
6862 return ;
6963 }
7064 $ client ->start ($ this ->option ('daemon ' ));
71- Output:: writeln ('server started ' );
65+ Stdin:: println ('server started ' );
7266 break ;
7367
7468 case 'stop ' :
7569 if (!$ client ->serverIsRunning ()) {
76- Output:: warning ('the server is not running ' );
70+ Stdin:: println ('the server is not running ' );
7771 return ;
7872 }
7973 $ client ->inspector ->stopServer ();
8074 break ;
8175
8276 case 'reload ' :
8377 if (!$ client ->serverIsRunning ()) {
84- Output:: warning ('the server is not running ' );
78+ Stdin:: println ('the server is not running ' );
8579 return ;
8680 }
8781 $ client ->inspector ->reloadServer ();
8882 break ;
8983
9084 case 'restart ' :
9185 if (!$ client ->serverIsRunning ()) {
92- Output:: warning ('the server is not running ' );
86+ Stdin:: println ('the server is not running ' );
9387 return ;
9488 }
9589 $ client ->inspector ->restartServer ();
9690 break ;
9791
9892 case 'status ' :
9993 if (!$ client ->serverIsRunning ()) {
100- Output:: writeln ('the server is not running ' );
94+ Stdin:: println ('the server is not running ' );
10195 } else {
102- Output:: info ('the server is running ' );
96+ Stdin:: println ('the server is running ' );
10397 }
10498 break ;
10599
106100 default :
107- Output:: warning ('Unsupported operation ' );
101+ Stdin:: println ('Unsupported operation ' );
108102 }
109103 }
110104}
0 commit comments