Skip to content

Commit eab9fb4

Browse files
committed
cs fix
1 parent 883afb9 commit eab9fb4

13 files changed

+12
-82
lines changed

src/OneBot/Config/Loader/AbstractFileLoader.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99

1010
abstract class AbstractFileLoader implements LoaderInterface
1111
{
12-
/**
13-
* {@inheritDoc}
14-
*/
1512
public function load($source): array
1613
{
1714
// TODO: flexible base path

src/OneBot/Config/Loader/DelegateLoader.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ public function __construct(array $loaders = null)
2525
$this->loaders = $loaders ?? self::getDefaultLoaders();
2626
}
2727

28-
/**
29-
* {@inheritDoc}
30-
*/
3128
public function load($source): array
3229
{
3330
return $this->determineLoader($source)->load($source);

src/OneBot/Config/Loader/JsonFileLoader.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
class JsonFileLoader extends AbstractFileLoader
88
{
9-
/**
10-
* {@inheritDoc}
11-
*/
129
protected function loadFile(string $file)
1310
{
1411
try {

src/OneBot/Config/Repository.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ public function __construct(array $config = [])
2121
$this->config = $config;
2222
}
2323

24-
/**
25-
* {@inheritDoc}
26-
*/
2724
public function get(string $key, $default = null)
2825
{
2926
// 在表层直接查找,找到就直接返回
@@ -51,9 +48,6 @@ public function get(string $key, $default = null)
5148
return $data;
5249
}
5350

54-
/**
55-
* {@inheritDoc}
56-
*/
5751
public function set(string $key, $value): void
5852
{
5953
if ($value === null) {
@@ -75,17 +69,11 @@ public function set(string $key, $value): void
7569
$data = $value;
7670
}
7771

78-
/**
79-
* {@inheritDoc}
80-
*/
8172
public function has(string $key): bool
8273
{
8374
return $this->get($key) !== null;
8475
}
8576

86-
/**
87-
* {@inheritDoc}
88-
*/
8977
public function all(): array
9078
{
9179
return $this->config;

src/OneBot/Driver/Event/DriverEvent.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ public static function getName(): string
2424
return static::$custom_name ?? static::class;
2525
}
2626

27-
/**
28-
* {@inheritDoc}
29-
*/
3027
public function isPropagationStopped(): bool
3128
{
3229
return $this->propagation_stopped;

src/OneBot/Driver/Swoole/EventLoop.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,11 @@
1010

1111
class EventLoop extends DriverEventLoopBase
1212
{
13-
/**
14-
* {@inheritDoc}
15-
*/
1613
public function addReadEvent($fd, callable $callable)
1714
{
1815
Event::add($fd, $callable);
1916
}
2017

21-
/**
22-
* {@inheritDoc}
23-
*/
2418
public function delReadEvent($fd)
2519
{
2620
Event::del($fd);
@@ -36,9 +30,6 @@ public function delWriteEvent($fd)
3630
Event::del($fd);
3731
}
3832

39-
/**
40-
* {@inheritDoc}
41-
*/
4233
public function addTimer(int $ms, callable $callable, int $times = 1, array $arguments = []): int
4334
{
4435
$timer_count = 0;
@@ -54,17 +45,11 @@ public function addTimer(int $ms, callable $callable, int $times = 1, array $arg
5445
}, ...$arguments);
5546
}
5647

57-
/**
58-
* {@inheritDoc}
59-
*/
6048
public function clearTimer(int $timer_id)
6149
{
6250
Timer::clear($timer_id);
6351
}
6452

65-
/**
66-
* {@inheritDoc}
67-
*/
6853
public function clearAllTimer()
6954
{
7055
Timer::clearAll();

src/OneBot/Driver/Swoole/Socket/WSServerSocket.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ public function close($fd): bool
2727
return false;
2828
}
2929

30-
/**
31-
* {@inheritDoc}
32-
*/
3330
public function send($data, $fd): bool
3431
{
3532
if ($data instanceof FrameInterface) {

src/OneBot/Driver/Swoole/SwooleDriver.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ public function getEventLoop(): DriverEventLoopBase
5959
return EventLoop::getInstance();
6060
}
6161

62-
/**
63-
* {@inheritDoc}
64-
*/
6562
public function initInternalDriverClasses(?array $http, ?array $http_webhook, ?array $ws, ?array $ws_reverse): array
6663
{
6764
if (!empty($ws)) {

src/OneBot/Driver/Workerman/EventLoop.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

1111
class EventLoop extends DriverEventLoopBase
1212
{
13-
/**
14-
* {@inheritDoc}
15-
*/
1613
public function addTimer(int $ms, callable $callable, int $times = 1, array $arguments = []): int
1714
{
1815
$timer_count = 0;
@@ -28,49 +25,31 @@ public function addTimer(int $ms, callable $callable, int $times = 1, array $arg
2825
}, $arguments);
2926
}
3027

31-
/**
32-
* {@inheritDoc}
33-
*/
3428
public function clearTimer(int $timer_id)
3529
{
3630
Timer::del($timer_id);
3731
}
3832

39-
/**
40-
* {@inheritDoc}
41-
*/
4233
public function addReadEvent($fd, callable $callable)
4334
{
4435
Worker::getEventLoop()->add($fd, EventInterface::EV_READ, $callable);
4536
}
4637

47-
/**
48-
* {@inheritDoc}
49-
*/
5038
public function delReadEvent($fd)
5139
{
5240
Worker::getEventLoop()->del($fd, EventInterface::EV_READ);
5341
}
5442

55-
/**
56-
* {@inheritDoc}
57-
*/
5843
public function addWriteEvent($fd, callable $callable)
5944
{
6045
Worker::getEventLoop()->add($fd, EventInterface::EV_WRITE, $callable);
6146
}
6247

63-
/**
64-
* {@inheritDoc}
65-
*/
6648
public function delWriteEvent($fd)
6749
{
6850
Worker::getEventLoop()->del($fd, EventInterface::EV_WRITE);
6951
}
7052

71-
/**
72-
* {@inheritDoc}
73-
*/
7453
public function clearAllTimer()
7554
{
7655
Timer::delAll();

src/OneBot/Driver/Workerman/Worker.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public static function stopAll($code = 0, $log = '')
117117
}
118118
foreach ($worker_pid_array as $worker_pid) {
119119
\posix_kill($worker_pid, $sig);
120-
if (!static::$_gracefulStop){
120+
if (!static::$_gracefulStop) {
121121
Timer::add(static::$stopTimeout, '\posix_kill', [$worker_pid, \SIGKILL], false);
122122
}
123123
}
@@ -130,7 +130,7 @@ public static function stopAll($code = 0, $log = '')
130130
else {
131131
// Execute exit.
132132
foreach (static::$_workers as $worker) {
133-
if (!$worker->stopping){
133+
if (!$worker->stopping) {
134134
$worker->stop();
135135
$worker->stopping = true;
136136
}
@@ -156,7 +156,8 @@ public static function stopAll($code = 0, $log = '')
156156
*
157157
* @return array
158158
*/
159-
public static function getStartFilesForWindows() {
159+
public static function getStartFilesForWindows()
160+
{
160161
return [''];
161162
}
162163

@@ -303,7 +304,7 @@ protected static function parseCommand(): void
303304
}
304305
static::safeEcho("\nPress Ctrl+C to quit.\n\n");
305306
}
306-
// no break
307+
// no break
307308
case 'connections':
308309
if (\is_file($statistics_file) && is_writable($statistics_file)) {
309310
\unlink($statistics_file);

src/OneBot/Driver/Workerman/WorkermanDriver.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ public function getWSServerSocketByWorker(Worker $worker): ?WSServerSocket
5858
return null;
5959
}
6060

61-
/**
62-
* {@inheritDoc}
63-
*/
6461
public function run(): void
6562
{
6663
try {
@@ -121,8 +118,6 @@ public function getName(): string
121118
}
122119

123120
/**
124-
* {@inheritDoc}
125-
*
126121
* @throws \Exception
127122
*/
128123
public function initWSReverseClients(array $headers = [])

src/OneBot/V12/EventBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function valid(): bool
3636
try {
3737
$this->event = new OneBotEvent($this->data);
3838
return true;
39-
}catch (OneBotException $e) {
39+
} catch (OneBotException $e) {
4040
return false;
4141
}
4242
}

tests/OneBot/Config/RepositoryTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ protected function setUp(): void
4949
);
5050
}
5151

52-
// 尚未确定是否应该支持
53-
// public function testGetValueWhenKeyContainsDot(): void
54-
// {
55-
// $this->assertEquals('c', $this->repository->get('a.b'));
56-
// $this->assertEquals('d', $this->repository->get('a.b.c'));
57-
// }
52+
// 尚未确定是否应该支持
53+
// public function testGetValueWhenKeyContainsDot(): void
54+
// {
55+
// $this->assertEquals('c', $this->repository->get('a.b'));
56+
// $this->assertEquals('d', $this->repository->get('a.b.c'));
57+
// }
5858

5959
public function testGetBooleanValue(): void
6060
{

0 commit comments

Comments
 (0)