@@ -10,39 +10,22 @@ class ControllerSpecificationGenerator extends PromptingGenerator implements Gen
1010{
1111 const SUPPORTED_GENERATOR = 'controller_specification ' ;
1212
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
2014 {
2115 return self ::SUPPORTED_GENERATOR === $ generation ;
2216 }
2317
24- public function getPriority ()
18+ public function getPriority (): int
2519 {
2620 return 0 ;
2721 }
2822
29- /**
30- * @param ResourceInterface $resource
31- *
32- * @return string
33- */
34- protected function getFilePath (ResourceInterface $ resource )
23+ protected function getFilePath (ResourceInterface $ resource ): string
3524 {
3625 return $ resource ->getSpecFilename ();
3726 }
3827
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
4629 {
4730 $ values = [
4831 '%filepath% ' => $ filepath ,
@@ -61,13 +44,7 @@ protected function renderTemplate(ResourceInterface $resource, $filepath)
6144 return $ content ;
6245 }
6346
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
7148 {
7249 return sprintf (
7350 "<info>ControllerSpecification for <value>%s</value> created in <value>'%s'</value>.</info> \n" ,
0 commit comments