mirror of
https://github.com/danog/php-tokio.git
synced 2024-11-30 04:39:44 +01:00
phpcs fix
php cs fixed ,
This commit is contained in:
parent
6f11a1cfd8
commit
6886b039e5
@ -4,27 +4,32 @@ namespace Reqwest;
|
||||
|
||||
use Revolt\EventLoop;
|
||||
|
||||
final class Client {
|
||||
final class Client
|
||||
{
|
||||
private static ?string $id = null;
|
||||
|
||||
public static function init(): void {
|
||||
public static function init(): void
|
||||
{
|
||||
if (self::$id !== null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$f = fopen("php://fd/".\Client::init(), 'r+');
|
||||
$f = fopen("php://fd/" . \Client::init(), "r+");
|
||||
stream_set_blocking($f, false);
|
||||
self::$id = EventLoop::onReadable($f, fn () => \Client::wakeup());
|
||||
self::$id = EventLoop::onReadable($f, fn() => \Client::wakeup());
|
||||
}
|
||||
|
||||
public static function reference(): void{
|
||||
public static function reference(): void
|
||||
{
|
||||
EventLoop::reference(self::$id);
|
||||
}
|
||||
public static function unreference(): void {
|
||||
public static function unreference(): void
|
||||
{
|
||||
EventLoop::unreference(self::$id);
|
||||
}
|
||||
|
||||
public static function __callStatic(string $name, array $args): mixed {
|
||||
public static function __callStatic(string $name, array $args): mixed
|
||||
{
|
||||
return \Client::$name(...$args);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user