Skip to content

Commit

Permalink
Merge branch master of github.com:openswoole/openswoole into master
Browse files Browse the repository at this point in the history
  • Loading branch information
doubaokun committed Dec 10, 2023
1 parent b2e4ac3 commit 8c4de5f
Show file tree
Hide file tree
Showing 49 changed files with 482 additions and 1,402 deletions.
33 changes: 9 additions & 24 deletions src/OpenSwoole/Atomic.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,62 +6,47 @@
* @link https://openswoole.com
* @contact [email protected]
*/

namespace OpenSwoole;

class Atomic
{
/**
* @param int $value [optional] = 0
*/
public function __construct(int $value = 0)
{
}
public function __construct(int $value = 0) {}

/**
* @param int $value [optional] = 1
*/
public function add(int $value = 1): int
{
}
public function add(int $value = 1): int {}

/**
* @param int $value [optional] = 1
*/
public function sub(int $value = 1): int
{
}
public function sub(int $value = 1): int {}

public function get(): int
{
}
public function get(): int {}

/**
* @param int $value [required]
* @return ?bool
*/
public function set(int $value): ?bool
{
}
public function set(int $value): ?bool {}

/**
* @param float $timeout [optional] = 1
*/
public function wait(float $timeout = 1): bool
{
}
public function wait(float $timeout = 1): bool {}

/**
* @param int $count [optional] = 1
*/
public function wakeup(int $count = 1): bool
{
}
public function wakeup(int $count = 1): bool {}

/**
* @param int $cmpVal [optional] = 0
* @param int $newVal [optional] = 0
*/
public function cmpset(int $cmpVal = 0, int $newVal = 0): bool
{
}
public function cmpset(int $cmpVal = 0, int $newVal = 0): bool {}
}
25 changes: 7 additions & 18 deletions src/OpenSwoole/Atomic/Long.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,37 @@
* @link https://openswoole.com
* @contact [email protected]
*/

namespace OpenSwoole\Atomic;

class Long
{
/**
* @param int $value [optional] = 0
*/
public function __construct(int $value = 0)
{
}
public function __construct(int $value = 0) {}

/**
* @param int $value [optional] = 1
*/
public function add(int $value = 1): int
{
}
public function add(int $value = 1): int {}

/**
* @param int $value [optional] = 1
*/
public function sub(int $value = 1): int
{
}
public function sub(int $value = 1): int {}

public function get(): int
{
}
public function get(): int {}

/**
* @param int $value [required]
* @return ?bool
*/
public function set(int $value): ?bool
{
}
public function set(int $value): ?bool {}

/**
* @param int $cmpVal [optional] = 0
* @param int $newVal [optional] = 0
*/
public function cmpset(int $cmpVal = 0, int $newVal = 0): bool
{
}
public function cmpset(int $cmpVal = 0, int $newVal = 0): bool {}
}
69 changes: 18 additions & 51 deletions src/OpenSwoole/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @link https://openswoole.com
* @contact [email protected]
*/

namespace OpenSwoole;

class Client
Expand Down Expand Up @@ -43,104 +44,70 @@ class Client
* @param bool $async [optional] = false
* @param string $id [optional] = ''
*/
public function __construct(int $sockType, bool $async = false, string $id = '')
{
}
public function __construct(int $sockType, bool $async = false, string $id = '') {}

public function __destruct()
{
}
public function __destruct() {}

/**
* @param array $settings [required]
*/
public function set(array $settings): bool
{
}
public function set(array $settings): bool {}

/**
* @param string $host [required]
* @param int $port [required]
* @param float $timeout [optional] = 0.5
* @param int $sockFlag [optional] = 0
*/
public function connect(string $host, int $port, float $timeout = 0.5, int $sockFlag = 0): bool
{
}
public function connect(string $host, int $port, float $timeout = 0.5, int $sockFlag = 0): bool {}

/**
* @param int $length [optional] = 65535
* @param int $flags [optional] = 0
*/
public function recv(int $length = 65535, int $flags = 0): string
{
}
public function recv(int $length = 65535, int $flags = 0): string {}

/**
* @param string $data [required]
* @param int $flags [optional] = 0
*/
public function send(string $data, int $flags = 0)
{
}
public function send(string $data, int $flags = 0) {}

/**
* @param string $fileName [required]
* @param int $offset [optional] = 0
* @param int $length [optional] = 0
*/
public function sendfile(string $fileName, int $offset = 0, int $length = 0): bool
{
}
public function sendfile(string $fileName, int $offset = 0, int $length = 0): bool {}

/**
* @param string $ip [required]
* @param int $port [required]
* @param string $data [required]
*/
public function sendto(string $ip, int $port, string $data): bool
{
}
public function sendto(string $ip, int $port, string $data): bool {}

/**
* @param int $how [required]
*/
public function shutdown(int $how): bool
{
}
public function shutdown(int $how): bool {}

public function enableSSL(): bool
{
}
public function enableSSL(): bool {}

public function getPeerCert(): string
{
}
public function getPeerCert(): string {}

public function verifyPeerCert(): bool
{
}
public function verifyPeerCert(): bool {}

public function isConnected(): bool
{
}
public function isConnected(): bool {}

public function getsockname()
{
}
public function getsockname() {}

public function getpeername()
{
}
public function getpeername() {}

/**
* @param bool $force [optional] = false
*/
public function close(bool $force = false): bool
{
}
public function close(bool $force = false): bool {}

public static function select(array &$readReady, array &$writeReady, array &$errors, float $timeout = 0.5): bool
{
}
public static function select(array &$readReady, array &$writeReady, array &$errors, float $timeout = 0.5): bool {}
}
5 changes: 2 additions & 3 deletions src/OpenSwoole/Client/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
* @link https://openswoole.com
* @contact [email protected]
*/

namespace OpenSwoole\Client;

class Exception extends \OpenSwoole\Exception
{
}
class Exception extends \OpenSwoole\Exception {}
71 changes: 13 additions & 58 deletions src/OpenSwoole/Connection/Iterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,93 +6,48 @@
* @link https://openswoole.com
* @contact [email protected]
*/

namespace OpenSwoole\Connection;

use ArrayAccess;
use Countable;

class Iterator implements \Iterator, ArrayAccess, Countable
{
public function __construct()
{
}
public function __construct() {}

public function __destruct()
{
}
public function __destruct() {}

/**
* @return mixed
*/
public function rewind()
{
}
public function rewind() {}

/**
* @return mixed
*/
public function next()
{
}
public function next() {}

/**
* @return mixed
*/
public function current()
{
}
public function current() {}

/**
* @return mixed
*/
public function key()
{
}
public function key() {}

/**
* @return mixed
*/
public function valid()
{
}
public function valid() {}

/**
* @return mixed
*/
public function count()
{
}
public function count() {}

/**
* @param mixed $key [required]
* @return mixed
*/
public function offsetExists($key)
{
}
public function offsetExists($key) {}

/**
* @param mixed $key [required]
* @return mixed
*/
public function offsetGet($key)
{
}
public function offsetGet($key) {}

/**
* @param mixed $key [required]
* @param mixed $value [required]
* @return mixed
*/
public function offsetSet($key, $value)
{
}
public function offsetSet($key, $value) {}

/**
* @param mixed $key [required]
* @return mixed
*/
public function offsetUnset($key)
{
}
public function offsetUnset($key) {}
}
1 change: 1 addition & 0 deletions src/OpenSwoole/Constant.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @link https://openswoole.com
* @contact [email protected]
*/

namespace OpenSwoole;

class Constant
Expand Down
Loading

0 comments on commit 8c4de5f

Please sign in to comment.