@@ -145,6 +145,10 @@ |
||
145 | 145 | { |
146 | 146 | return $rootNamespace.'\Http\Controllers\API'; |
147 | 147 | } |
148 | + |
|
149 | + /** |
|
150 | + * @param string $rootNamespace |
|
151 | + */ |
|
148 | 152 | protected function getRepoNamespace($rootNamespace) { |
149 | 153 | return $rootNamespace.'Repositories'; |
150 | 154 | } |
@@ -168,6 +168,10 @@ |
||
168 | 168 | { |
169 | 169 | return $rootNamespace.'\Http\Controllers\Admin'; |
170 | 170 | } |
171 | + |
|
172 | + /** |
|
173 | + * @param string $rootNamespace |
|
174 | + */ |
|
171 | 175 | protected function getRepoNamespace($rootNamespace) { |
172 | 176 | return $rootNamespace.'Repositories'; |
173 | 177 | } |
@@ -68,8 +68,8 @@ |
||
68 | 68 | /** |
69 | 69 | * Determine if the file already exists. |
70 | 70 | * |
71 | - * @param $path |
|
72 | - * @return bool |
|
71 | + * @param string $path |
|
72 | + * @return string|false |
|
73 | 73 | */ |
74 | 74 | protected function alreadyExists($path) |
75 | 75 | { |
@@ -76,6 +76,9 @@ |
||
76 | 76 | ; |
77 | 77 | } |
78 | 78 | |
79 | + /** |
|
80 | + * @param string $modelVariableName |
|
81 | + */ |
|
79 | 82 | protected function getVisibleColumns($tableName, $modelVariableName) { |
80 | 83 | $relationships = $this->setBelongsToRelations(); |
81 | 84 | $columns = $this->readColumnsFromTable($tableName); |
@@ -5,6 +5,9 @@ discard block |
||
5 | 5 | |
6 | 6 | trait Helpers { |
7 | 7 | |
8 | + /** |
|
9 | + * @param string $key |
|
10 | + */ |
|
8 | 11 | public function option($key = null) { |
9 | 12 | return ($key === null || $this->hasOption($key)) ? parent::option($key) : null; |
10 | 13 | } |
@@ -27,7 +30,7 @@ discard block |
||
27 | 30 | /** |
28 | 31 | * Determine if the file already exists. |
29 | 32 | * |
30 | - * @param $path |
|
33 | + * @param string $path |
|
31 | 34 | * @return bool |
32 | 35 | */ |
33 | 36 | protected function alreadyExists($path) |
@@ -40,7 +43,7 @@ discard block |
||
40 | 43 | * Check if provided relation has a table |
41 | 44 | * |
42 | 45 | * @param $relationTable |
43 | - * @return mixed |
|
46 | + * @return boolean |
|
44 | 47 | */ |
45 | 48 | public function checkRelationTable($relationTable) |
46 | 49 | { |
@@ -152,6 +152,11 @@ |
||
152 | 152 | return false; |
153 | 153 | } |
154 | 154 | |
155 | + /** |
|
156 | + * @param string $type |
|
157 | + * |
|
158 | + * @return string |
|
159 | + */ |
|
155 | 160 | protected function buildForm($type=null) { |
156 | 161 | $belongsTos = $this->setBelongsToRelations(); |
157 | 162 | $relatables = $this->getVisibleColumns($this->tableName, $this->modelVariableName)->filter(function($column) use($belongsTos) { |
@@ -138,6 +138,9 @@ discard block |
||
138 | 138 | |
139 | 139 | } |
140 | 140 | |
141 | + /** |
|
142 | + * @return string |
|
143 | + */ |
|
141 | 144 | protected function buildForm() { |
142 | 145 | |
143 | 146 | return view('jig::'.$this->view, [ |
@@ -162,6 +165,9 @@ discard block |
||
162 | 165 | ])->render(); |
163 | 166 | } |
164 | 167 | |
168 | + /** |
|
169 | + * @return string |
|
170 | + */ |
|
165 | 171 | protected function buildFormJs() { |
166 | 172 | return view('jig::'.$this->viewJs, [ |
167 | 173 | 'modelJSName' => $this->formJsRelativePath, |
@@ -75,6 +75,9 @@ |
||
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
78 | + /** |
|
79 | + * @return string |
|
80 | + */ |
|
78 | 81 | protected function buildView() { |
79 | 82 | |
80 | 83 | return view('jig::'.$this->view, [ |