Skip to content

Commit ca006e5

Browse files
committed
Add missing visibility modifiers in stubs
1 parent 1d05771 commit ca006e5

File tree

12 files changed

+219
-219
lines changed

12 files changed

+219
-219
lines changed

Zend/zend_closures.stub.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
private function __construct() {}
66

77
/** @return ?Closure */
8-
static function bind(Closure $closure, ?object $newthis, $newscope = UNKNOWN) {}
8+
public static function bind(Closure $closure, ?object $newthis, $newscope = UNKNOWN) {}
99

1010
/** @return ?Closure */
11-
function bindTo(?object $newthis, $newscope = UNKNOWN) {}
11+
public function bindTo(?object $newthis, $newscope = UNKNOWN) {}
1212

1313
/** @return mixed */
14-
function call(object $newthis, ...$parameters) {}
14+
public function call(object $newthis, ...$parameters) {}
1515

1616
/**
1717
* @param callable $callable Not a proper type annotation due to bug #78770
1818
* @return Closure
1919
*/
20-
function fromCallable($callable) {}
20+
public function fromCallable($callable) {}
2121
}

Zend/zend_exceptions.stub.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,63 +3,63 @@
33
interface Throwable extends Stringable
44
{
55
/** @return string */
6-
function getMessage();
6+
public function getMessage();
77

88
/** @return int */
9-
function getCode();
9+
public function getCode();
1010

1111
/** @return string */
12-
function getFile();
12+
public function getFile();
1313

1414
/** @return int */
15-
function getLine();
15+
public function getLine();
1616

1717
/** @return array */
18-
function getTrace();
18+
public function getTrace();
1919

2020
/** @return ?Throwable */
21-
function getPrevious();
21+
public function getPrevious();
2222

2323
/** @return string */
24-
function getTraceAsString();
24+
public function getTraceAsString();
2525
}
2626

2727
class Exception implements Throwable
2828
{
2929
final private function __clone() {}
3030

31-
function __construct(string $message = UNKNOWN, int $code = 0, ?Throwable $previous = null) {}
31+
public function __construct(string $message = UNKNOWN, int $code = 0, ?Throwable $previous = null) {}
3232

33-
function __wakeup() {}
33+
public function __wakeup() {}
3434

3535
/** @return string */
36-
final function getMessage() {}
36+
final public function getMessage() {}
3737

3838
/** @return int */
39-
final function getCode() {}
39+
final public function getCode() {}
4040

4141
/** @return string */
42-
final function getFile() {}
42+
final public function getFile() {}
4343

4444
/** @return int */
45-
final function getLine() {}
45+
final public function getLine() {}
4646

4747
/** @return array */
48-
final function getTrace() {}
48+
final public function getTrace() {}
4949

5050
/** @return ?Throwable */
51-
final function getPrevious() {}
51+
final public function getPrevious() {}
5252

5353
/** @return string */
54-
final function getTraceAsString() {}
54+
final public function getTraceAsString() {}
5555

56-
function __toString(): string {}
56+
public function __toString(): string {}
5757
}
5858

5959
class ErrorException extends Exception
6060
{
61-
function __construct(string $message = UNKNOWN, int $code = 0, int $severity = E_ERROR, string $filename = UNKNOWN, int $lineno = 0, ?Throwable $previous = null) {}
61+
public function __construct(string $message = UNKNOWN, int $code = 0, int $severity = E_ERROR, string $filename = UNKNOWN, int $lineno = 0, ?Throwable $previous = null) {}
6262

6363
/** @return int */
64-
final function getSeverity() {}
64+
final public function getSeverity() {}
6565
}

Zend/zend_generators.stub.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22

33
final class Generator implements Iterator
44
{
5-
function rewind(): void {}
5+
public function rewind(): void {}
66

7-
function valid(): bool {}
7+
public function valid(): bool {}
88

99
/** @return mixed */
10-
function current() {}
10+
public function current() {}
1111

1212
/** @return mixed */
13-
function key() {}
13+
public function key() {}
1414

15-
function next(): void {}
15+
public function next(): void {}
1616

1717
/** @return mixed */
18-
function send($value) {}
18+
public function send($value) {}
1919

2020
/** @return mixed */
21-
function throw(Throwable $exception) {}
21+
public function throw(Throwable $exception) {}
2222

2323
/** @return mixed */
24-
function getReturn() {}
24+
public function getReturn() {}
2525
}

Zend/zend_interfaces.stub.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,59 +5,59 @@ interface Traversable {}
55
interface IteratorAggregate extends Traversable
66
{
77
/** @return Traversable */
8-
function getIterator();
8+
public function getIterator();
99
}
1010

1111
interface Iterator extends Traversable
1212
{
1313
/** @return mixed */
14-
function current();
14+
public function current();
1515

1616
/** @return void */
17-
function next();
17+
public function next();
1818

1919
/** @return mixed */
20-
function key();
20+
public function key();
2121

2222
/** @return bool */
23-
function valid();
23+
public function valid();
2424

2525
/** @return void */
26-
function rewind();
26+
public function rewind();
2727
}
2828

2929
interface ArrayAccess
3030
{
3131
/** @return bool */
32-
function offsetExists($offset);
32+
public function offsetExists($offset);
3333

3434
/* actually this should be return by ref but atm cannot be */
3535
/** @return mixed */
36-
function offsetGet($offset);
36+
public function offsetGet($offset);
3737

3838
/** @return void */
39-
function offsetSet($offset, $value);
39+
public function offsetSet($offset, $value);
4040

4141
/** @return void */
42-
function offsetUnset($offset);
42+
public function offsetUnset($offset);
4343
}
4444

4545
interface Serializable
4646
{
4747
/** @return string */
48-
function serialize();
48+
public function serialize();
4949

5050
/** @return void */
51-
function unserialize(string $serialized);
51+
public function unserialize(string $serialized);
5252
}
5353

5454
interface Countable
5555
{
5656
/** @return int */
57-
function count();
57+
public function count();
5858
}
5959

6060
interface Stringable
6161
{
62-
function __toString(): string;
62+
public function __toString(): string;
6363
}

ext/ffi/ffi.stub.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,61 @@
22

33
final class FFI
44
{
5-
static function cdef(string $code = UNKNOWN, string $lib = UNKNOWN): ?FFI {}
5+
public static function cdef(string $code = UNKNOWN, string $lib = UNKNOWN): ?FFI {}
66

7-
static function load(string $filename): ?FFI {}
7+
public static function load(string $filename): ?FFI {}
88

9-
static function scope(string $scope_name): ?FFI {}
9+
public static function scope(string $scope_name): ?FFI {}
1010

1111
/** @param FFI\CType|string $type */
12-
static function new($type, bool $owned = true, bool $persistent = false): ?FFI\CData {}
12+
public static function new($type, bool $owned = true, bool $persistent = false): ?FFI\CData {}
1313

1414
/** @prefer-ref $ptr */
15-
static function free(FFI\CData $ptr): void {}
15+
public static function free(FFI\CData $ptr): void {}
1616

1717
/**
1818
* @param FFI\CType|string $type
1919
* @prefer-ref $ptr
2020
*/
21-
static function cast($type, $ptr): ?FFI\CData {}
21+
public static function cast($type, $ptr): ?FFI\CData {}
2222

23-
static function type(string $type): ?FFI\CType {}
23+
public static function type(string $type): ?FFI\CType {}
2424

2525
/** @prefer-ref $ptr */
26-
static function typeof(FFI\CData $ptr): ?FFI\CType {}
26+
public static function typeof(FFI\CData $ptr): ?FFI\CType {}
2727

28-
static function arrayType(FFI\CType $type, array $dims): ?FFI\CType {}
28+
public static function arrayType(FFI\CType $type, array $dims): ?FFI\CType {}
2929

3030
/** @prefer-ref $ptr */
31-
static function addr(FFI\CData $ptr): FFI\CData {}
31+
public static function addr(FFI\CData $ptr): FFI\CData {}
3232

3333
/** @prefer-ref $ptr */
34-
static function sizeof(object $ptr): ?int {}
34+
public static function sizeof(object $ptr): ?int {}
3535

3636
/** @prefer-ref $ptr */
37-
static function alignof(object $ptr): ?int {}
37+
public static function alignof(object $ptr): ?int {}
3838

3939
/**
4040
* @prefer-ref $dst
4141
* @prefer-ref $src
4242
* @param string|FFI\CData $dst
4343
*/
44-
static function memcpy(FFI\CData $dst, $src, int $size): void {}
44+
public static function memcpy(FFI\CData $dst, $src, int $size): void {}
4545

4646
/**
4747
* @prefer-ref $ptr1
4848
* @param string|FFI\CData $ptr1
4949
* @prefer-ref $ptr2
5050
* @param string|FFI\CData $ptr2
5151
*/
52-
static function memcmp($ptr1, $ptr2, int $size): ?int {}
52+
public static function memcmp($ptr1, $ptr2, int $size): ?int {}
5353

5454
/** @prefer-ref $ptr */
55-
static function memset(FFI\CData $ptr, int $ch, int $size): void {}
55+
public static function memset(FFI\CData $ptr, int $ch, int $size): void {}
5656

5757
/** @prefer-ref $ptr */
58-
static function string(FFI\CData $ptr, int $size = UNKNOWN): ?string {}
58+
public static function string(FFI\CData $ptr, int $size = UNKNOWN): ?string {}
5959

6060
/** @prefer-ref $ptr */
61-
static function isNull(FFI\CData $ptr): bool {}
61+
public static function isNull(FFI\CData $ptr): bool {}
6262
}

ext/fileinfo/fileinfo.stub.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44

55
class finfo
66
{
7-
function __construct(int $options = FILEINFO_NONE, string $arg = "") {}
7+
public function __construct(int $options = FILEINFO_NONE, string $arg = "") {}
88

99
/**
1010
* @param ?resource $context
1111
* @return string|false
1212
*/
13-
function file(string $file_name, int $options = FILEINFO_NONE, $context = null) {}
13+
public function file(string $file_name, int $options = FILEINFO_NONE, $context = null) {}
1414

1515
/**
1616
* @param ?resource $context
1717
* @return string|false
1818
*/
19-
function buffer(string $string, int $options = FILEINFO_NONE, $context = null) {}
19+
public function buffer(string $string, int $options = FILEINFO_NONE, $context = null) {}
2020

2121
/** @return bool */
22-
function set_flags(int $options) {}
22+
public function set_flags(int $options) {}
2323
}
2424

2525
/** @return resource|false */

ext/session/session.stub.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,35 +50,35 @@ function session_start(array $options = []): bool {}
5050
interface SessionHandlerInterface
5151
{
5252
/** @return bool */
53-
function open(string $save_path, string $session_name);
53+
public function open(string $save_path, string $session_name);
5454

5555
/** @return bool */
56-
function close();
56+
public function close();
5757

5858
/** @return string */
59-
function read(string $key);
59+
public function read(string $key);
6060

6161
/** @return bool */
62-
function write(string $key, string $val);
62+
public function write(string $key, string $val);
6363

6464
/** @return bool */
65-
function destroy(string $key);
65+
public function destroy(string $key);
6666

6767
/** @return int|bool */
68-
function gc(int $maxlifetime);
68+
public function gc(int $maxlifetime);
6969
}
7070

7171
interface SessionIdInterface
7272
{
7373
/** @return string */
74-
function create_sid();
74+
public function create_sid();
7575
}
7676

7777
interface SessionUpdateTimestampHandlerInterface
7878
{
7979
/** @return bool */
80-
function validateId(string $key);
80+
public function validateId(string $key);
8181

8282
/** @return bool */
83-
function updateTimestamp(string $key, string $val);
83+
public function updateTimestamp(string $key, string $val);
8484
}

0 commit comments

Comments
 (0)