Skip to content

Commit 648db48

Browse files
committed
strict typing
1 parent 37aec4e commit 648db48

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

src/Maker/MakeSubscriber.php

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,7 @@ public function configureDependencies(DependencyBuilder $dependencies): void
121121
{
122122
}
123123

124-
/**
125-
* @param $event
126-
*/
127-
private function getEventConstant($event): string
124+
private function getEventConstant(string $event): string
128125
{
129126
$constants = $this->getKernelEventsConstants();
130127

@@ -137,10 +134,7 @@ private function getEventConstant($event): string
137134
return sprintf('\'%s\'', $event);
138135
}
139136

140-
/**
141-
* @param $event
142-
*/
143-
private function isNeedImportConstantsClass($event): bool
137+
private function isNeedImportConstantsClass(string $event): bool
144138
{
145139
$constants = $this->getKernelEventsConstants();
146140

@@ -155,8 +149,6 @@ private function isNeedImportConstantsClass($event): bool
155149

156150
private function getKernelEventsConstants(): array
157151
{
158-
$class = new \ReflectionClass(KernelEvents::class);
159-
160-
return $class->getConstants();
152+
return (new \ReflectionClass(KernelEvents::class))->getConstants();
161153
}
162154
}

tests/Maker/MakeSubscriberTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ protected function getMakerClass(): string
2222
return MakeSubscriber::class;
2323
}
2424

25-
public function getTestDetails()
25+
public function getTestDetails(): \Generator
2626
{
2727
yield 'it_makes_subscriber_for_known_event' => [$this->createMakerTest()
2828
->run(function (MakerTestRunner $runner) {

0 commit comments

Comments
 (0)