1 | <?php namespace Cerbero\Workflow\Console\Commands; |
||
14 | abstract class WorkflowGeneratorCommand extends GeneratorCommand { |
||
15 | |||
16 | /** |
||
17 | * @author Andrea Marco Sartori |
||
18 | * @var Cerbero\Workflow\Repositories\PipelineRepositoryInterface $pipelines Pipeline repository. |
||
19 | */ |
||
20 | protected $pipelines; |
||
21 | |||
22 | /** |
||
23 | * @author Andrea Marco Sartori |
||
24 | * @var Cerbero\Workflow\Inflectors\InflectorInterface $inflector Inflector. |
||
25 | */ |
||
26 | protected $inflector; |
||
27 | |||
28 | /** |
||
29 | * Set the dependencies. |
||
30 | * |
||
31 | * @param \Illuminate\Filesystem\Filesystem $files |
||
32 | * @return void |
||
|
|||
33 | */ |
||
34 | public function __construct( |
||
35 | Filesystem $files, |
||
36 | PipelineRepositoryInterface $pipelines, |
||
37 | InflectorInterface $inflector |
||
38 | ) { |
||
39 | parent::__construct($files); |
||
40 | |||
41 | $this->pipelines = $pipelines; |
||
42 | |||
43 | $this->inflector = $inflector; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * Get the stub file for the generator. |
||
48 | * |
||
49 | * @return string |
||
50 | */ |
||
51 | protected function getStub() |
||
55 | |||
56 | /** |
||
57 | * Retrieve the name of the workflow. |
||
58 | * |
||
59 | * @author Andrea Marco Sartori |
||
60 | * @return string |
||
61 | */ |
||
62 | protected function getWorkflowName() |
||
68 | |||
69 | /** |
||
70 | * Get the console command arguments. |
||
71 | * |
||
72 | * @return array |
||
73 | */ |
||
74 | protected function getArguments() |
||
80 | |||
81 | } |
||
82 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.