Skip to content

Commit 0eb45ea

Browse files
committed
strict declare return type. update some info
1 parent d92f6b7 commit 0eb45ea

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
}
2626
},
2727
"suggest": {
28-
"inhere/simple-print-tool": "Very lightweight data printing tools",
2928
"inhere/php-validate": "Very lightweight data validate tool",
3029
"inhere/console": "a lightweight php console application library."
3130
}

src/ProcessUtil.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ public static function isRunning(int $pid): bool
325325
* exit
326326
* @param int $code
327327
*/
328-
public static function quit($code = 0)
328+
public static function quit($code = 0): void
329329
{
330330
exit((int)$code);
331331
}
@@ -581,7 +581,7 @@ public static function setTitle(string $title): bool
581581
* @param string $group
582582
* @throws \RuntimeException
583583
*/
584-
public static function changeScriptOwner(string $user, string $group = '')
584+
public static function changeScriptOwner(string $user, string $group = ''): void
585585
{
586586
$uInfo = \posix_getpwnam($user);
587587

src/Sys.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public static function execute(string $command, bool $returnStatus = true, strin
143143
* run a command in background
144144
* @param string $cmd
145145
*/
146-
public static function bgExec(string $cmd)
146+
public static function bgExec(string $cmd): void
147147
{
148148
self::execInBackground($cmd);
149149
}
@@ -152,7 +152,7 @@ public static function bgExec(string $cmd)
152152
* run a command in background
153153
* @param string $cmd
154154
*/
155-
public static function execInBackground(string $cmd)
155+
public static function execInBackground(string $cmd): void
156156
{
157157
if (self::isWindows()) {
158158
\pclose(\popen('start /B ' . $cmd, 'r'));
@@ -231,7 +231,7 @@ public static function bashIsAvailable(): bool
231231
*/
232232
public static function getOutsideIP(): string
233233
{
234-
list($code, $output) = self::run('ip addr | grep eth0');
234+
[$code, $output] = self::run('ip addr | grep eth0');
235235

236236
if ($code === 0 && $output && \preg_match('#inet (.*)\/#', $output, $ms)) {
237237
return $ms[1];

0 commit comments

Comments
 (0)