/
Php81.phpstub
111 lines (94 loc) · 2.67 KB
/
Php81.phpstub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php
namespace {
interface UnitEnum {
/** @var non-empty-string $name */
public readonly string $name;
/**
* @psalm-pure
* @return list<static>
*/
public static function cases(): array;
}
interface BackedEnum extends UnitEnum
{
public readonly int|string $value;
/**
* @psalm-pure
*/
public static function from(string|int $value): static;
/**
* @psalm-pure
*/
public static function tryFrom(string|int $value): ?static;
}
class ReflectionClass implements Reflector {
/** @psalm-pure */
public function isEnum(): bool {}
}
class ReflectionProperty implements Reflector
{
/**
* Starting from PHP 8.1, this method is pure, and has no effect.
*
* @psalm-pure
*/
public function setAccessible(bool $accessible): void {}
}
class ReflectionMethod extends ReflectionFunctionAbstract
{
/**
* Starting from PHP 8.1, this method is pure, and has no effect.
*
* @psalm-pure
*/
public function setAccessible(bool $accessible): void {}
}
/** @psalm-immutable */
class ReflectionEnum extends ReflectionClass implements Reflector
{
public function getBackingType(): ?ReflectionType;
public function getCase(string $name): ReflectionEnumUnitCase;
/** @return list<ReflectionEnumUnitCase> */
public function getCases(): array;
public function hasCase(string $name): bool;
public function isBacked(): bool;
}
/** @psalm-immutable */
class ReflectionEnumUnitCase extends ReflectionClassConstant implements Reflector
{
public function getEnum(): ReflectionEnum;
public function getValue(): UnitEnum;
}
/** @psalm-immutable */
class ReflectionEnumBackedCase extends ReflectionEnumUnitCase implements Reflector
{
public function getBackingValue(): int|string;
}
/** @psalm-immutable */
class ReflectionIntersectionType extends ReflectionType {
/** @return non-empty-list<ReflectionNamedType> */
public function getTypes(): array {}
/** @return false */
public function allowsNull(): bool {}
}
}
namespace FTP {
final class Connection {}
}
namespace IMAP {
final class Connection {}
}
namespace LDAP {
final class Connection {}
final class Result {}
final class ResultEntry {}
}
namespace PgSql {
final class Connection {}
final class Result {}
final class Lob {}
}
namespace PSpell {
final class Config {}
final class Dictionary {}
}