mirror of
https://github.com/danog/ipc.git
synced 2024-11-26 20:15:05 +01:00
cs-fix
This commit is contained in:
parent
e119d9d477
commit
cf179aff9d
@ -3,7 +3,6 @@ sudo: false
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.2
|
||||
- 7.3
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
use Amp\Loop;
|
||||
use Amp\Ipc\Sync\ChannelledSocket;
|
||||
use Amp\Loop;
|
||||
|
||||
use function Amp\asyncCall;
|
||||
use function Amp\Ipc\connect;
|
||||
@ -19,7 +19,7 @@ Loop::run(static function () {
|
||||
echo "Closed connection".PHP_EOL;
|
||||
};
|
||||
|
||||
$channel = yield connect(sys_get_temp_dir().'/test');
|
||||
$channel = yield connect(\sys_get_temp_dir().'/test');
|
||||
asyncCall($clientHandler, $channel);
|
||||
yield $channel->send('ping');
|
||||
});
|
@ -3,8 +3,8 @@
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
use Amp\Ipc\IpcServer;
|
||||
use Amp\Loop;
|
||||
use Amp\Ipc\Sync\ChannelledSocket;
|
||||
use Amp\Loop;
|
||||
|
||||
use function Amp\asyncCall;
|
||||
|
||||
@ -22,7 +22,7 @@ Loop::run(static function () {
|
||||
echo "Closed connection".PHP_EOL."==========".PHP_EOL;
|
||||
};
|
||||
|
||||
$server = new IpcServer(sys_get_temp_dir().'/test');
|
||||
$server = new IpcServer(\sys_get_temp_dir().'/test');
|
||||
while ($socket = yield $server->accept()) {
|
||||
asyncCall($clientHandler, $socket);
|
||||
}
|
||||
|
@ -3,8 +3,8 @@
|
||||
namespace Amp\Ipc;
|
||||
|
||||
use Amp\Deferred;
|
||||
use Amp\Loop;
|
||||
use Amp\Ipc\Sync\ChannelledSocket;
|
||||
use Amp\Loop;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
|
||||
|
@ -17,7 +17,7 @@ use function Amp\call;
|
||||
function connect(string $uri): Promise
|
||||
{
|
||||
return call(static function () use ($uri) {
|
||||
if (!file_exists($uri)) {
|
||||
if (!\file_exists($uri)) {
|
||||
throw new \RuntimeException("The endpoint does not exist!");
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ class IpcTest extends AsyncTestCase
|
||||
|
||||
public function provideUriFifo(): \Generator
|
||||
{
|
||||
foreach (['', sys_get_temp_dir().'/pony'] as $uri) {
|
||||
foreach (['', \sys_get_temp_dir().'/pony'] as $uri) {
|
||||
if (\strncasecmp(\PHP_OS, "WIN", 3) === 0) {
|
||||
yield [$uri, false];
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user