1
0
mirror of https://github.com/danog/process.git synced 2024-11-30 04:39:04 +01:00

Update Travis config and fix code style

This commit is contained in:
Niklas Keller 2017-09-20 11:54:19 +02:00 committed by Aaron Piotrowski
parent 96491ebfe1
commit 8cbd431dab
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB
7 changed files with 19 additions and 14 deletions

View File

@ -5,6 +5,7 @@ language: php
php:
- 7.0
- 7.1
- 7.2
- nightly
matrix:
@ -19,7 +20,6 @@ install:
script:
- phpdbg -qrr vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
- php vendor/bin/fqn-check lib
- PHP_CS_FIXER_IGNORE_ENV=1 php vendor/bin/php-cs-fixer --diff --dry-run -v fix
after_script:

View File

@ -10,8 +10,7 @@
"require-dev": {
"phpunit/phpunit": "^6",
"amphp/phpunit-util": "^1",
"friendsofphp/php-cs-fixer": "^2.3",
"kelunik/fqn-check": "^0.1.3"
"friendsofphp/php-cs-fixer": "^2.3"
},
"license": "MIT",
"authors": [

View File

@ -3,11 +3,9 @@
include dirname(__DIR__) . "/vendor/autoload.php";
use Amp\Process\Process;
use Amp\Promise;
use function Amp\Promise\all;
function show_process_output(Process $process): \Generator
{
function show_process_output(Process $process): \Generator {
$stream = $process->getStdout();
while (null !== $chunk = yield $stream->read()) {

View File

@ -39,7 +39,7 @@ interface ProcessRunner {
public function kill(ProcessHandle $handle);
/**
* Send a signal signal to the child process
* Send a signal signal to the child process.
*
* @param ProcessHandle $handle The process descriptor.
* @param int $signo Signal number to send to process.

View File

@ -187,8 +187,10 @@ final class SocketConnector {
if ($packet['signal'] !== SignalCode::HANDSHAKE_ACK || $packet['status'] !== HandshakeStatus::SUCCESS) {
$this->failHandleStart(
$handle, "Client rejected handshake with code %d for stream #%d",
$packet['status'], $pendingClient->streamId
$handle,
"Client rejected handshake with code %d for stream #%d",
$packet['status'],
$pendingClient->streamId
);
return;
}
@ -215,7 +217,9 @@ final class SocketConnector {
if (\strlen($data) !== 5) {
$this->failHandleStart(
$handle, 'Failed to read PID from wrapper: Received %d of 5 expected bytes', \strlen($data)
$handle,
'Failed to read PID from wrapper: Received %d of 5 expected bytes',
\strlen($data)
);
return;
}
@ -224,7 +228,9 @@ final class SocketConnector {
if ($packet['signal'] !== SignalCode::CHILD_PID) {
$this->failHandleStart(
$handle, "Failed to read PID from wrapper: Unexpected signal code %d", $packet['signal']
$handle,
"Failed to read PID from wrapper: Unexpected signal code %d",
$packet['signal']
);
return;
}
@ -266,7 +272,9 @@ final class SocketConnector {
if ($packet['signal'] !== SignalCode::EXIT_CODE) {
$this->failHandleStart(
$handle, "Failed to read exit code from wrapper: Unexpected signal code %d", $packet['signal']
$handle,
"Failed to read exit code from wrapper: Unexpected signal code %d",
$packet['signal']
);
return;
}