Skip to content

Commit c294cca

Browse files
committed
style(all): format all codes
Signed-off-by: inhere <in.798@qq.com>
1 parent 8431327 commit c294cca

File tree

5 files changed

+78
-78
lines changed

5 files changed

+78
-78
lines changed

src/Proc/ProcessUtil.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,33 @@
1212
use Closure;
1313
use RuntimeException;
1414
use Toolkit\Stdlib\OS;
15-
use function pcntl_fork;
16-
use function pcntl_waitpid;
17-
use function pcntl_wexitstatus;
1815
use function array_merge;
19-
use function posix_kill;
20-
use function time;
21-
use function usleep;
16+
use function cli_set_process_title;
17+
use function error_get_last;
18+
use function file_exists;
19+
use function file_get_contents;
20+
use function function_exists;
21+
use function getmypid;
22+
use function pcntl_alarm;
23+
use function pcntl_async_signals;
24+
use function pcntl_fork;
2225
use function pcntl_signal;
2326
use function pcntl_signal_dispatch;
2427
use function pcntl_signal_get_handler;
25-
use function pcntl_async_signals;
28+
use function pcntl_waitpid;
29+
use function pcntl_wexitstatus;
30+
use function posix_geteuid;
31+
use function posix_getgrnam;
2632
use function posix_getpid;
27-
use function getmypid;
28-
use function file_exists;
29-
use function file_get_contents;
30-
use function unlink;
33+
use function posix_getpwnam;
3134
use function posix_getpwuid;
3235
use function posix_getuid;
33-
use function pcntl_alarm;
34-
use function cli_set_process_title;
35-
use function error_get_last;
36-
use function posix_getpwnam;
37-
use function posix_getgrnam;
36+
use function posix_kill;
3837
use function posix_setgid;
3938
use function posix_setuid;
40-
use function posix_geteuid;
41-
use function function_exists;
39+
use function time;
40+
use function unlink;
41+
use function usleep;
4242
use const DIRECTORY_SEPARATOR;
4343
use const PHP_OS;
4444

@@ -94,7 +94,7 @@ public static function isPtySupported(): bool
9494
return $result = false;
9595
}
9696

97-
return $result = (bool) @proc_open('echo 1 >/dev/null', [['pty'], ['pty'], ['pty']], $pipes);
97+
return $result = (bool)@proc_open('echo 1 >/dev/null', [['pty'], ['pty'], ['pty']], $pipes);
9898
}
9999

100100
/**********************************************************************

src/Proc/Signal.php

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -23,73 +23,73 @@ final class Signal
2323

2424
public const ERR = -1;
2525

26-
public const HUP = 1;
26+
public const HUP = 1;
2727

28-
public const INT = 2; // Ctrl+C
28+
public const INT = 2; // Ctrl+C
2929

30-
public const QUIT = 3;
30+
public const QUIT = 3;
3131

32-
public const ILL = 4;
32+
public const ILL = 4;
3333

34-
public const TRAP = 5;
34+
public const TRAP = 5;
3535

36-
public const ABRT = 6;
36+
public const ABRT = 6;
3737

38-
public const IOT = 6;
38+
public const IOT = 6;
3939

40-
public const BUS = 7;
40+
public const BUS = 7;
4141

42-
public const FPE = 8;
42+
public const FPE = 8;
4343

44-
public const KILL = 9;
44+
public const KILL = 9;
4545

46-
public const USR1 = 10;
46+
public const USR1 = 10;
4747

48-
public const SEGV = 11;
48+
public const SEGV = 11;
4949

50-
public const USR2 = 12;
50+
public const USR2 = 12;
5151

52-
public const PIPE = 13;
52+
public const PIPE = 13;
5353

54-
public const ALRM = 14;
54+
public const ALRM = 14;
5555

56-
public const TERM = 15;
56+
public const TERM = 15;
5757

5858
public const STKFLT = 16;
5959

60-
public const CLD = 17;
60+
public const CLD = 17;
6161

62-
public const CHLD = 17;
62+
public const CHLD = 17;
6363

64-
public const CONT = 18;
64+
public const CONT = 18;
6565

66-
public const STOP = 19;
66+
public const STOP = 19;
6767

68-
public const TSTP = 20;
68+
public const TSTP = 20;
6969

70-
public const TTIN = 21;
70+
public const TTIN = 21;
7171

72-
public const TTOU = 22;
72+
public const TTOU = 22;
7373

74-
public const URG = 23;
74+
public const URG = 23;
7575

76-
public const XCPU = 24;
76+
public const XCPU = 24;
7777

78-
public const XFSZ = 25;
78+
public const XFSZ = 25;
7979

8080
public const VTALRM = 26;
8181

82-
public const PROF = 27;
82+
public const PROF = 27;
8383

84-
public const WINCH = 28;
84+
public const WINCH = 28;
8585

86-
public const POLL = 29;
86+
public const POLL = 29;
8787

88-
public const IO = 29;
88+
public const IO = 29;
8989

90-
public const PWR = 30;
90+
public const PWR = 30;
9191

92-
public const SYS = 31;
92+
public const SYS = 31;
9393

94-
public const BABY = 31;
94+
public const BABY = 31;
9595
}

src/Traits/PhpEnvTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
namespace Toolkit\Sys\Traits;
1111

1212
use RuntimeException;
13-
use function get_defined_constants;
14-
use function in_array;
1513
use function defined;
16-
use function function_exists;
1714
use function extension_loaded;
15+
use function function_exists;
16+
use function get_defined_constants;
1817
use function get_loaded_extensions;
18+
use function in_array;
1919

2020
/**
2121
* Trait PhpEnvTrait

src/Util/PhpError.php

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

1010
namespace Toolkit\Sys\Util;
1111

12+
use const E_COMPILE_ERROR;
1213
use const E_COMPILE_WARNING;
13-
use const E_ERROR;
14-
use const E_PARSE;
15-
use const E_WARNING;
16-
use const E_NOTICE;
1714
use const E_CORE_ERROR;
1815
use const E_CORE_WARNING;
19-
use const E_COMPILE_ERROR;
20-
use const E_USER_ERROR;
21-
use const E_USER_WARNING;
22-
use const E_USER_NOTICE;
23-
use const E_STRICT;
24-
use const E_RECOVERABLE_ERROR;
2516
use const E_DEPRECATED;
17+
use const E_ERROR;
18+
use const E_NOTICE;
19+
use const E_PARSE;
20+
use const E_RECOVERABLE_ERROR;
21+
use const E_STRICT;
2622
use const E_USER_DEPRECATED;
23+
use const E_USER_ERROR;
24+
use const E_USER_NOTICE;
25+
use const E_USER_WARNING;
26+
use const E_WARNING;
2727

2828
/**
2929
* Class PhpError

src/Util/PhpException.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
namespace Toolkit\Sys\Util;
1111

1212
use Throwable;
13-
use function strip_tags;
1413
use function get_class;
1514
use function json_encode;
15+
use function strip_tags;
1616

1717
/**
1818
* Class PhpException
@@ -23,8 +23,8 @@ class PhpException
2323
{
2424
/**
2525
* @param Throwable $e
26-
* @param bool $getTrace
27-
* @param null $catcher
26+
* @param bool $getTrace
27+
* @param null $catcher
2828
*
2929
* @return string
3030
* @see PhpException::toHtml()
@@ -37,10 +37,10 @@ public static function toString(Throwable $e, $getTrace = true, $catcher = null)
3737
/**
3838
* Converts an exception into a simple string.
3939
*
40-
* @param Throwable $e the exception being converted
41-
* @param bool $clearHtml
42-
* @param bool $getTrace
43-
* @param null|string $catcher
40+
* @param Throwable $e the exception being converted
41+
* @param bool $clearHtml
42+
* @param bool $getTrace
43+
* @param null|string $catcher
4444
*
4545
* @return string the string representation of the exception.
4646
*/
@@ -67,9 +67,9 @@ public static function toHtml(Throwable $e, bool $getTrace = true, string $catch
6767
/**
6868
* Converts an exception into a simple array.
6969
*
70-
* @param Throwable $e the exception being converted
71-
* @param bool $getTrace
72-
* @param null|string $catcher
70+
* @param Throwable $e the exception being converted
71+
* @param bool $getTrace
72+
* @param null|string $catcher
7373
*
7474
* @return array
7575
*/
@@ -96,9 +96,9 @@ public static function toArray(Throwable $e, bool $getTrace = true, string $catc
9696
/**
9797
* Converts an exception into a json string.
9898
*
99-
* @param Throwable $e the exception being converted
100-
* @param bool $getTrace
101-
* @param null|string $catcher
99+
* @param Throwable $e the exception being converted
100+
* @param bool $getTrace
101+
* @param null|string $catcher
102102
*
103103
* @return string the string representation of the exception.
104104
*/

0 commit comments

Comments
 (0)