Skip to content

Commit 419bc0d

Browse files
committed
Fix
1 parent cdf9cb5 commit 419bc0d

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

tests/PHPStan/Rules/Generics/data/scalar-class-name.php

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ interface Scalar
99
/**
1010
* @return T
1111
*/
12-
public function value(): mixed;
12+
public function value();
1313
}
1414

1515
namespace MaxGoryunov\SavingIterator\Fakes;
@@ -23,25 +23,32 @@ public function value(): mixed;
2323
*/
2424
class The implements Scalar
2525
{
26+
/**
27+
* @var T
28+
*/
29+
private $subject;
30+
31+
/**
32+
* @var Closure(T): mixed
33+
*/
34+
private $context;
35+
2636
/**
2737
* @param T $subject
2838
* @param Closure(T): mixed $context
2939
*/
3040
public function __construct(
31-
/**
32-
* @var T
33-
*/
34-
private mixed $subject,
35-
/**
36-
* @var Closure(T): mixed
37-
*/
38-
private Closure $context
39-
) {
41+
$subject,
42+
$context
43+
)
44+
{
45+
$this->subject = $subject;
46+
$this->context = $context;
4047
}
4148
/**
4249
* @return T
4350
*/
44-
public function value(): mixed
51+
public function value()
4552
{
4653
($this->context)($this->subject);
4754
return $this->subject;

0 commit comments

Comments
 (0)