Skip to content

Commit 609ee69

Browse files
committed
clean up skip ReturnTypeDeclarationRector
1 parent 06ec61f commit 609ee69

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

rector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
],
4848
ReturnTypeDeclarationRector::class => [
4949
__DIR__ . '/src/Controller',
50-
__DIR__ . '/spec/Fixture/NotSupportedContainer.php',
5150
],
5251
]);
5352
};

spec/Fixture/NotSupportedContainer.php

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@
77

88
class NotSupportedContainer implements ContainerInterface
99
{
10-
/**
11-
* @return stdClass
12-
*/
13-
public function get($id) { return new stdClass(); }
14-
/**
15-
* @return bool
16-
*/
17-
public function has($id) { return true; }
10+
public function get($id): stdClass|array
11+
{
12+
if (random_int(0, 1) !== 0) {
13+
return new stdClass();
14+
}
15+
16+
return [];
17+
}
18+
19+
public function has($id): bool
20+
{
21+
return true;
22+
}
1823
}

0 commit comments

Comments
 (0)