Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2018-03-08 12:11:58 +00:00 committed by StyleCI Bot
parent e516000918
commit 64f1db2521

View File

@ -1,12 +1,14 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
if(!function_exists("readline")) { if (!function_exists('readline')) {
function readline($prompt = null){ function readline($prompt = null)
if($prompt){ {
if ($prompt) {
echo $prompt; echo $prompt;
} }
$fp = fopen("php://stdin","r"); $fp = fopen('php://stdin', 'r');
$line = rtrim(fgets($fp, 1024)); $line = rtrim(fgets($fp, 1024));
return $line; return $line;
} }
} }
@ -32,7 +34,7 @@ while (true) {
$pid = pcntl_fork(); $pid = pcntl_fork();
if ($pid === -1) { if ($pid === -1) {
die('Forking failed'.PHP_EOL); die('Forking failed'.PHP_EOL);
} else if ($pid) { } elseif ($pid) {
echo "Created child with PID $pid".PHP_EOL; echo "Created child with PID $pid".PHP_EOL;
} else { } else {
switch ($update['update']['_']) { switch ($update['update']['_']) {