Skip to content

Commit

Permalink
style(all): format all codes
Browse files Browse the repository at this point in the history
Signed-off-by: inhere <[email protected]>
  • Loading branch information
inhere committed Jul 25, 2021
1 parent 8431327 commit c294cca
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 78 deletions.
38 changes: 19 additions & 19 deletions src/Proc/ProcessUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,33 @@
use Closure;
use RuntimeException;
use Toolkit\Stdlib\OS;
use function pcntl_fork;
use function pcntl_waitpid;
use function pcntl_wexitstatus;
use function array_merge;
use function posix_kill;
use function time;
use function usleep;
use function cli_set_process_title;
use function error_get_last;
use function file_exists;
use function file_get_contents;
use function function_exists;
use function getmypid;
use function pcntl_alarm;
use function pcntl_async_signals;
use function pcntl_fork;
use function pcntl_signal;
use function pcntl_signal_dispatch;
use function pcntl_signal_get_handler;
use function pcntl_async_signals;
use function pcntl_waitpid;
use function pcntl_wexitstatus;
use function posix_geteuid;
use function posix_getgrnam;
use function posix_getpid;
use function getmypid;
use function file_exists;
use function file_get_contents;
use function unlink;
use function posix_getpwnam;
use function posix_getpwuid;
use function posix_getuid;
use function pcntl_alarm;
use function cli_set_process_title;
use function error_get_last;
use function posix_getpwnam;
use function posix_getgrnam;
use function posix_kill;
use function posix_setgid;
use function posix_setuid;
use function posix_geteuid;
use function function_exists;
use function time;
use function unlink;
use function usleep;
use const DIRECTORY_SEPARATOR;
use const PHP_OS;

Expand Down Expand Up @@ -94,7 +94,7 @@ public static function isPtySupported(): bool
return $result = false;
}

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

/**********************************************************************
Expand Down
66 changes: 33 additions & 33 deletions src/Proc/Signal.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,73 +23,73 @@ final class Signal

public const ERR = -1;

public const HUP = 1;
public const HUP = 1;

public const INT = 2; // Ctrl+C
public const INT = 2; // Ctrl+C

public const QUIT = 3;
public const QUIT = 3;

public const ILL = 4;
public const ILL = 4;

public const TRAP = 5;
public const TRAP = 5;

public const ABRT = 6;
public const ABRT = 6;

public const IOT = 6;
public const IOT = 6;

public const BUS = 7;
public const BUS = 7;

public const FPE = 8;
public const FPE = 8;

public const KILL = 9;
public const KILL = 9;

public const USR1 = 10;
public const USR1 = 10;

public const SEGV = 11;
public const SEGV = 11;

public const USR2 = 12;
public const USR2 = 12;

public const PIPE = 13;
public const PIPE = 13;

public const ALRM = 14;
public const ALRM = 14;

public const TERM = 15;
public const TERM = 15;

public const STKFLT = 16;

public const CLD = 17;
public const CLD = 17;

public const CHLD = 17;
public const CHLD = 17;

public const CONT = 18;
public const CONT = 18;

public const STOP = 19;
public const STOP = 19;

public const TSTP = 20;
public const TSTP = 20;

public const TTIN = 21;
public const TTIN = 21;

public const TTOU = 22;
public const TTOU = 22;

public const URG = 23;
public const URG = 23;

public const XCPU = 24;
public const XCPU = 24;

public const XFSZ = 25;
public const XFSZ = 25;

public const VTALRM = 26;

public const PROF = 27;
public const PROF = 27;

public const WINCH = 28;
public const WINCH = 28;

public const POLL = 29;
public const POLL = 29;

public const IO = 29;
public const IO = 29;

public const PWR = 30;
public const PWR = 30;

public const SYS = 31;
public const SYS = 31;

public const BABY = 31;
public const BABY = 31;
}
6 changes: 3 additions & 3 deletions src/Traits/PhpEnvTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
namespace Toolkit\Sys\Traits;

use RuntimeException;
use function get_defined_constants;
use function in_array;
use function defined;
use function function_exists;
use function extension_loaded;
use function function_exists;
use function get_defined_constants;
use function get_loaded_extensions;
use function in_array;

/**
* Trait PhpEnvTrait
Expand Down
20 changes: 10 additions & 10 deletions src/Util/PhpError.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@

namespace Toolkit\Sys\Util;

use const E_COMPILE_ERROR;
use const E_COMPILE_WARNING;
use const E_ERROR;
use const E_PARSE;
use const E_WARNING;
use const E_NOTICE;
use const E_CORE_ERROR;
use const E_CORE_WARNING;
use const E_COMPILE_ERROR;
use const E_USER_ERROR;
use const E_USER_WARNING;
use const E_USER_NOTICE;
use const E_STRICT;
use const E_RECOVERABLE_ERROR;
use const E_DEPRECATED;
use const E_ERROR;
use const E_NOTICE;
use const E_PARSE;
use const E_RECOVERABLE_ERROR;
use const E_STRICT;
use const E_USER_DEPRECATED;
use const E_USER_ERROR;
use const E_USER_NOTICE;
use const E_USER_WARNING;
use const E_WARNING;

/**
* Class PhpError
Expand Down
26 changes: 13 additions & 13 deletions src/Util/PhpException.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
namespace Toolkit\Sys\Util;

use Throwable;
use function strip_tags;
use function get_class;
use function json_encode;
use function strip_tags;

/**
* Class PhpException
Expand All @@ -23,8 +23,8 @@ class PhpException
{
/**
* @param Throwable $e
* @param bool $getTrace
* @param null $catcher
* @param bool $getTrace
* @param null $catcher
*
* @return string
* @see PhpException::toHtml()
Expand All @@ -37,10 +37,10 @@ public static function toString(Throwable $e, $getTrace = true, $catcher = null)
/**
* Converts an exception into a simple string.
*
* @param Throwable $e the exception being converted
* @param bool $clearHtml
* @param bool $getTrace
* @param null|string $catcher
* @param Throwable $e the exception being converted
* @param bool $clearHtml
* @param bool $getTrace
* @param null|string $catcher
*
* @return string the string representation of the exception.
*/
Expand All @@ -67,9 +67,9 @@ public static function toHtml(Throwable $e, bool $getTrace = true, string $catch
/**
* Converts an exception into a simple array.
*
* @param Throwable $e the exception being converted
* @param bool $getTrace
* @param null|string $catcher
* @param Throwable $e the exception being converted
* @param bool $getTrace
* @param null|string $catcher
*
* @return array
*/
Expand All @@ -96,9 +96,9 @@ public static function toArray(Throwable $e, bool $getTrace = true, string $catc
/**
* Converts an exception into a json string.
*
* @param Throwable $e the exception being converted
* @param bool $getTrace
* @param null|string $catcher
* @param Throwable $e the exception being converted
* @param bool $getTrace
* @param null|string $catcher
*
* @return string the string representation of the exception.
*/
Expand Down

0 comments on commit c294cca

Please sign in to comment.