| Total Complexity | 7 |
| Total Lines | 67 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | abstract class ResourceGeneratedEvent extends Event implements ResourceGenerationContract |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $filePath; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var Stub |
||
| 29 | */ |
||
| 30 | protected $stub; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * FileGeneratedEvent constructor. |
||
| 34 | * @param string $filePath |
||
| 35 | * @param Stub $stub |
||
| 36 | * @param string $generationClass |
||
| 37 | */ |
||
| 38 | public final function __construct(string $filePath, Stub $stub) |
||
| 39 | { |
||
| 40 | $this->filePath = $filePath; |
||
| 41 | $this->stub = $stub; |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | public function getFilePath(): string |
||
| 48 | { |
||
| 49 | return $this->filePath; |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return Stub |
||
| 54 | */ |
||
| 55 | public function getStub(): Stub |
||
| 56 | { |
||
| 57 | return $this->stub; |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return string|null |
||
| 62 | */ |
||
| 63 | public function getNamespace(): ?string |
||
| 64 | { |
||
| 65 | return $this->getStubOption("namespace"); |
||
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @return string|null |
||
| 70 | */ |
||
| 71 | public function getClassName(): ?string |
||
| 74 | } |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @return string|null |
||
| 78 | */ |
||
| 79 | public function getModuleName(): string |
||
| 80 | { |
||
| 81 | return $this->getStubOption("module"); |
||
|
|
|||
| 82 | } |
||
| 83 | |||
| 84 | public function getStubOption(string $option) |
||
| 87 | } |
||
| 88 | |||
| 90 |