@@ -88,7 +88,7 @@ |
||
88 | 88 | /** |
89 | 89 | * Get module instance. |
90 | 90 | * |
91 | - * @return \Nwidart\Modules\Module |
|
91 | + * @return string |
|
92 | 92 | */ |
93 | 93 | public function getModule() |
94 | 94 | { |
@@ -90,7 +90,7 @@ |
||
90 | 90 | /** |
91 | 91 | * Get matches data from regex. |
92 | 92 | * |
93 | - * @return array |
|
93 | + * @return string[] |
|
94 | 94 | */ |
95 | 95 | public function getMatches() |
96 | 96 | { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | /** |
69 | 69 | * @throws \InvalidArgumentException |
70 | 70 | * |
71 | - * @return mixed |
|
71 | + * @return MigrationMakeCommand |
|
72 | 72 | */ |
73 | 73 | protected function getTemplateContents() |
74 | 74 | { |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
111 | - * @return mixed |
|
111 | + * @return string |
|
112 | 112 | */ |
113 | 113 | protected function getDestinationFilePath() |
114 | 114 | { |
@@ -106,7 +106,7 @@ |
||
106 | 106 | /** |
107 | 107 | * Set console command instance. |
108 | 108 | * |
109 | - * @param \Illuminate\Console\Command $console |
|
109 | + * @param \Nwidart\Modules\Commands\InstallCommand $console |
|
110 | 110 | * |
111 | 111 | * @return $this |
112 | 112 | */ |
@@ -126,9 +126,7 @@ discard block |
||
126 | 126 | /** |
127 | 127 | * Creates a new Module instance |
128 | 128 | * |
129 | - * @param Container $app |
|
130 | - * @param string $args |
|
131 | - * @param string $path |
|
129 | + * @param string[] $args |
|
132 | 130 | * @return \Nwidart\Modules\Module |
133 | 131 | */ |
134 | 132 | abstract protected function createModule(...$args); |
@@ -632,7 +630,7 @@ discard block |
||
632 | 630 | /** |
633 | 631 | * Get stub path. |
634 | 632 | * |
635 | - * @return string|null |
|
633 | + * @return string|boolean |
|
636 | 634 | */ |
637 | 635 | public function getStubPath() |
638 | 636 | { |
@@ -239,7 +239,7 @@ |
||
239 | 239 | /** |
240 | 240 | * Get a specific data from composer.json file by given the key. |
241 | 241 | * |
242 | - * @param $key |
|
242 | + * @param string $key |
|
243 | 243 | * @param null $default |
244 | 244 | * |
245 | 245 | * @return mixed |
@@ -50,7 +50,9 @@ discard block |
||
50 | 50 | */ |
51 | 51 | protected function getCached() |
52 | 52 | { |
53 | - if(!$this->config->get('modules.cache.enabled')) return $this->readJson(); |
|
53 | + if(!$this->config->get('modules.cache.enabled')) { |
|
54 | + return $this->readJson(); |
|
55 | + } |
|
54 | 56 | |
55 | 57 | return $this->cache->remember($this->cacheKey, $this->cacheLifetime, function () { |
56 | 58 | return $this->readJson(); |
@@ -84,7 +86,9 @@ discard block |
||
84 | 86 | */ |
85 | 87 | protected function readJson() |
86 | 88 | { |
87 | - if(!$this->files->exists($this->fileInstalled)) return []; |
|
89 | + if(!$this->files->exists($this->fileInstalled)) { |
|
90 | + return []; |
|
91 | + } |
|
88 | 92 | return json_decode($this->files->get($this->fileInstalled), true); |
89 | 93 | } |
90 | 94 | |
@@ -117,7 +121,9 @@ discard block |
||
117 | 121 | */ |
118 | 122 | public function isStatus(Module $module, $status) |
119 | 123 | { |
120 | - if(!isset($this->installed[$module->getName()])) return false; |
|
124 | + if(!isset($this->installed[$module->getName()])) { |
|
125 | + return false; |
|
126 | + } |
|
121 | 127 | return $this->installed[$module->getName()] == $status; |
122 | 128 | } |
123 | 129 | |
@@ -144,7 +150,9 @@ discard block |
||
144 | 150 | */ |
145 | 151 | public function delete(Module $module) |
146 | 152 | { |
147 | - if(!isset($this->installed[$module->getName()])) return; |
|
153 | + if(!isset($this->installed[$module->getName()])) { |
|
154 | + return; |
|
155 | + } |
|
148 | 156 | unset($this->installed[$module->getName()]); |
149 | 157 | $this->writeJson(); |
150 | 158 | $this->forgetCache(); |