Skip to content

Commit 147e6b1

Browse files
committed
add fixture wtih docblock
1 parent c734845 commit 147e6b1

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector\FixtureIntersection;
6+
7+
final class CoverIntersectionWithDocblock
8+
{
9+
public function run(array $values): void
10+
{
11+
/** @var int[] $items */
12+
$items = [];
13+
14+
foreach ($values as $value) {
15+
$items[] = 10;
16+
}
17+
18+
$this->nextItems($items);
19+
}
20+
21+
private function nextItems($items): void
22+
{
23+
}
24+
}
25+
26+
?>
27+
-----
28+
<?php
29+
30+
declare(strict_types=1);
31+
32+
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector\FixtureIntersection;
33+
34+
final class CoverIntersectionWithDocblock
35+
{
36+
public function run(array $values): void
37+
{
38+
/** @var int[] $items */
39+
$items = [];
40+
41+
foreach ($values as $value) {
42+
$items[] = 10;
43+
}
44+
45+
$this->nextItems($items);
46+
}
47+
48+
private function nextItems(array $items): void
49+
{
50+
}
51+
}
52+
53+
?>

0 commit comments

Comments
 (0)