Skip to content

Commit c2a3194

Browse files
rlerdorfkrakjoe
authored andcommitted
Fix stubs to make them consistent for PHP 8
1 parent 0c3f411 commit c2a3194

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

php_memcached.stub.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88

99
class Memcached {
1010

11-
public function __construct(string $persistent_id=null, callable $callback=null, string $connection_str=null) {}
11+
public function __construct(?string $persistent_id=null, ?callable $callback=null, ?string $connection_str=null) {}
1212

1313
public function getResultCode(): int {}
1414
public function getResultMessage(): string {}
1515

16-
public function get(string $key, callable $cache_cb=null, int $get_flags=0): mixed {}
17-
public function getByKey(string $server_key, string $key, callable $cache_cb=null, int $get_flags=0): mixed {}
16+
public function get(string $key, ?callable $cache_cb=null, int $get_flags=0): mixed {}
17+
public function getByKey(string $server_key, string $key, ?callable $cache_cb=null, int $get_flags=0): mixed {}
1818
public function getMulti(array $keys, int $get_flags=0): false|array {}
1919
public function getMultiByKey(string $server_key, array $keys, int $get_flags=0): false|array {}
20-
public function getDelayed(array $keys, bool $with_cas=false, callable $value_cb=null): bool {}
21-
public function getDelayedByKey(string $server_key, array $keys, bool $with_cas=false, callable $value_cb=null): bool {}
20+
public function getDelayed(array $keys, bool $with_cas=false, ?callable $value_cb=null): bool {}
21+
public function getDelayedByKey(string $server_key, array $keys, bool $with_cas=false, ?callable $value_cb=null): bool {}
2222
public function fetch(): false|array {}
2323
public function fetchAll(): false|array {}
2424

@@ -64,7 +64,7 @@ public function getLastErrorCode(): int {}
6464
public function getLastErrorErrno(): int {}
6565
public function getLastDisconnectedServer(): false|array {}
6666

67-
public function getStats(string $type=null): false|array {}
67+
public function getStats(?string $type=null): false|array {}
6868
public function getVersion(): false|array {}
6969
public function getAllKeys(): false|array {}
7070

0 commit comments

Comments
 (0)