| Total Complexity | 4 | 
| Total Lines | 47 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 9 | class MakeActivatorCommand extends GeneratorCommand | ||
| 10 | { | ||
| 11 | protected $name = 'fondbot:make:activator'; | ||
| 12 | protected $description = 'Create a new intent activator class'; | ||
| 13 | protected $type = 'Activator'; | ||
| 14 | |||
| 15 | /** | ||
| 16 | * Get the stub file for the generator. | ||
| 17 | * | ||
| 18 | * @return string | ||
| 19 | */ | ||
| 20 | protected function getStub(): string | ||
| 21 |     { | ||
| 22 | return __DIR__.'/../../resources/stubs/Activator.stub'; | ||
| 23 | } | ||
| 24 | |||
| 25 | /** | ||
| 26 | * Parse the class name and format according to the root namespace. | ||
| 27 | * | ||
| 28 | * @param string $name | ||
| 29 | * @return string | ||
| 30 | */ | ||
| 31 | protected function qualifyClass($name): string | ||
| 32 |     { | ||
| 33 | return $name; | ||
| 34 | } | ||
| 35 | |||
| 36 | /** | ||
| 37 | * Get the destination class path. | ||
| 38 | * | ||
| 39 | * @param string $name | ||
| 40 | * @return string | ||
| 41 | */ | ||
| 42 | protected function getPath($name): string | ||
| 45 | } | ||
| 46 | |||
| 47 | /** | ||
| 48 | * Get the full namespace for a given class, without the class name. | ||
| 49 | * | ||
| 50 | * @param string $name | ||
| 51 | * @return string | ||
| 52 | */ | ||
| 53 | protected function getNamespace($name): string | ||
| 56 | } | ||
| 57 | } | ||
| 58 |