@@ -10,39 +10,22 @@ class ControllerSpecificationGenerator extends PromptingGenerator implements Gen
10
10
{
11
11
const SUPPORTED_GENERATOR = 'controller_specification ' ;
12
12
13
- /**
14
- * @param ResourceInterface $resource
15
- * @param string $generation
16
- * @param array $data
17
- * @return bool
18
- */
19
- public function supports (ResourceInterface $ resource , $ generation , array $ data )
13
+ public function supports (ResourceInterface $ resource , string $ generation , array $ data ): bool
20
14
{
21
15
return self ::SUPPORTED_GENERATOR === $ generation ;
22
16
}
23
17
24
- public function getPriority ()
18
+ public function getPriority (): int
25
19
{
26
20
return 0 ;
27
21
}
28
22
29
- /**
30
- * @param ResourceInterface $resource
31
- *
32
- * @return string
33
- */
34
- protected function getFilePath (ResourceInterface $ resource )
23
+ protected function getFilePath (ResourceInterface $ resource ): string
35
24
{
36
25
return $ resource ->getSpecFilename ();
37
26
}
38
27
39
- /**
40
- * @param ResourceInterface $resource
41
- * @param string $filepath
42
- *
43
- * @return string
44
- */
45
- protected function renderTemplate (ResourceInterface $ resource , $ filepath )
28
+ protected function renderTemplate (ResourceInterface $ resource , string $ filepath ): string
46
29
{
47
30
$ values = [
48
31
'%filepath% ' => $ filepath ,
@@ -61,13 +44,7 @@ protected function renderTemplate(ResourceInterface $resource, $filepath)
61
44
return $ content ;
62
45
}
63
46
64
- /**
65
- * @param ResourceInterface $resource
66
- * @param string $filepath
67
- *
68
- * @return string
69
- */
70
- protected function getGeneratedMessage (ResourceInterface $ resource , $ filepath )
47
+ protected function getGeneratedMessage (ResourceInterface $ resource , string $ filepath ): string
71
48
{
72
49
return sprintf (
73
50
"<info>ControllerSpecification for <value>%s</value> created in <value>'%s'</value>.</info> \n" ,
0 commit comments