| @@ 91-99 (lines=9) @@ | ||
| 88 | * @param array $columns |
|
| 89 | * @return string |
|
| 90 | */ |
|
| 91 | private function generatePhpDoc($columns) |
|
| 92 | { |
|
| 93 | $phpdoc = []; |
|
| 94 | foreach ($columns as $column) { |
|
| 95 | $phpdoc[] = sprintf(" * @property %s\t$%s", $column['type'], $column['name']); |
|
| 96 | }; |
|
| 97 | ||
| 98 | return implode("\n", $phpdoc); |
|
| 99 | } |
|
| 100 | ||
| 101 | /** |
|
| 102 | * @param array $columns |
|
| @@ 105-113 (lines=9) @@ | ||
| 102 | * @param array $columns |
|
| 103 | * @return string |
|
| 104 | */ |
|
| 105 | private function generateFillable($columns) |
|
| 106 | { |
|
| 107 | $fillable = []; |
|
| 108 | foreach ($columns as $column) { |
|
| 109 | $fillable[] = sprintf("\t\t'%s',", $column['name']); |
|
| 110 | }; |
|
| 111 | ||
| 112 | return implode("\n", $fillable); |
|
| 113 | } |
|
| 114 | } |
|
| 115 | ||