Skip to content

Commit 412b8da

Browse files
committed
style: update some comments
Signed-off-by: inhere <[email protected]>
1 parent 99966d7 commit 412b8da

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/Concern/ApplicationHelpTrait.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
use function str_replace;
3636
use function strpos;
3737
use function strtr;
38-
use function vdump;
3938
use const PHP_EOL;
4039
use const PHP_OS;
4140
use const PHP_VERSION;
@@ -198,7 +197,7 @@ public function showCommandList(): void
198197
/** @var AbstractHandler $controller */
199198
$desc = $controller::getDescription() ?: $placeholder;
200199
$aliases = $options['aliases'];
201-
$extra = $aliases ? ColorTag::wrap(' [alias: ' . implode(',', $aliases) . ']', 'info') : '';
200+
$extra = $aliases ? ColorTag::wrap(' (alias: ' . implode(',', $aliases) . ')', 'info') : '';
202201

203202
// collect
204203
$groupArr[$name] = $desc . $extra;

src/Concern/SimpleEventAwareTrait.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -49,25 +49,25 @@ trait SimpleEventAwareTrait
4949
/**
5050
* register a event handler
5151
*
52-
* @param $event
52+
* @param string $event
5353
* @param callable $handler
5454
* @param bool $once
5555
*/
56-
public function on(string $event, callable $handler, $once = false): void
56+
public function on(string $event, callable $handler, bool $once = false): void
5757
{
5858
if (self::isSupportedEvent($event)) {
5959
self::$eventHandlers[$event][] = $handler;
6060

6161
if (!isset(self::$events[$event])) {
62-
self::$events[$event] = (bool)$once;
62+
self::$events[$event] = $once;
6363
}
6464
}
6565
}
6666

6767
/**
6868
* register a once event handler
6969
*
70-
* @param $event
70+
* @param string $event
7171
* @param callable $handler
7272
*/
7373
public function once(string $event, callable $handler): void
@@ -111,7 +111,7 @@ public function fire(string $event, ...$args): bool
111111
/**
112112
* remove event and it's handlers
113113
*
114-
* @param $event
114+
* @param string $event
115115
*
116116
* @return bool
117117
*/
@@ -127,7 +127,7 @@ public function off(string $event): bool
127127
}
128128

129129
/**
130-
* @param $event
130+
* @param string $event
131131
*
132132
* @return bool
133133
*/
@@ -137,7 +137,7 @@ public function hasEvent(string $event): bool
137137
}
138138

139139
/**
140-
* @param $event
140+
* @param string $event
141141
*
142142
* @return bool
143143
*/

0 commit comments

Comments
 (0)