Skip to content

Commit 767bb46

Browse files
committed
Updated Rector to commit 70920b211391beb82fd05c269e6689e50b430988
rectorphp/rector-src@70920b2 [PHPStan 2.1.3] Add ReflectionAttribute and ReflectionIntersectionType stub for PHPStan 2.1.3 (#6723)
1 parent 20f374a commit 767bb46

File tree

3 files changed

+52
-3
lines changed

3 files changed

+52
-3
lines changed

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = '59d4bca60c0cc1efb8061524e0425454cb432bc8';
22+
public const PACKAGE_VERSION = '70920b211391beb82fd05c269e6689e50b430988';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-02-07 12:56:52';
27+
public const RELEASE_DATE = '2025-02-08 19:18:17';
2828
/**
2929
* @var int
3030
*/

stubs-rector/Internal/NativeClasses.php

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,42 @@ public function getTypes()
1111
}
1212
}
1313

14+
if (PHP_VERSION_ID < 80000 && ! class_exists('ReflectionAttribute', false)) {
15+
class ReflectionAttribute
16+
{
17+
18+
public const IS_INSTANCEOF = 2;
19+
20+
public function getName(): string
21+
{
22+
}
23+
24+
public function getTarget(): int
25+
{
26+
}
27+
28+
public function isRepeated(): bool
29+
{
30+
}
31+
32+
public function getArguments(): array
33+
{
34+
}
35+
36+
public function newInstance(): object
37+
{
38+
}
39+
40+
private function __clone()
41+
{
42+
}
43+
44+
private function __construct()
45+
{
46+
}
47+
}
48+
}
49+
1450
if (PHP_VERSION_ID < 80000 && ! class_exists('Attribute', false)) {
1551
#[Attribute(Attribute::TARGET_CLASS)]
1652
class Attribute
@@ -78,3 +114,16 @@ final class ReturnTypeWillChange
78114
{
79115
}
80116
}
117+
118+
if (PHP_VERSION_ID < 80100 && ! class_exists('ReflectionIntersectionType', false)) {
119+
class ReflectionIntersectionType extends ReflectionType
120+
{
121+
122+
/** @return ReflectionType[] */
123+
public function getTypes()
124+
{
125+
return [];
126+
}
127+
128+
}
129+
}

0 commit comments

Comments
 (0)