Skip to content

Commit 68eab23

Browse files
zonuexeondrejmirtes
authored andcommitted
Add ReturnTypeWillChange stub
refs phpstan/phpstan#5444
1 parent dae76e5 commit 68eab23

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

stubs/runtime/Attribute.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
<?php
22

3-
if (\PHP_VERSION_ID < 80000) {
4-
if (class_exists('Attribute', false)) {
5-
return;
6-
}
7-
3+
if (\PHP_VERSION_ID < 80000 && !class_exists('Attribute', false)) {
84
#[Attribute(Attribute::TARGET_CLASS)]
95
class Attribute
106
{
@@ -64,3 +60,10 @@ public function __construct($flags = self::TARGET_ALL)
6460

6561
}
6662
}
63+
64+
if (\PHP_VERSION_ID < 80100 && !class_exists('ReturnTypeWillChange', false)) {
65+
#[Attribute(Attribute::TARGET_METHOD)]
66+
final class ReturnTypeWillChange
67+
{
68+
}
69+
}

0 commit comments

Comments
 (0)