| Total Complexity | 4 |
| Total Lines | 60 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class ModelGenerator extends BaseGenerator implements GeneratorInterface |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Prepares the data before generation. |
||
| 19 | * |
||
| 20 | * @param array &$data |
||
| 21 | * @return void |
||
| 22 | */ |
||
| 23 | public function prepareData(array &$data) |
||
| 24 | { |
||
| 25 | $data['camel'] = []; |
||
| 26 | $data['columns'] = []; |
||
| 27 | $data['indexes'] = []; |
||
| 28 | $data['primaryKeys'] = []; |
||
| 29 | $data['underscore'] = []; |
||
| 30 | $data['columns'] = $this->describe->getTable($data['name']); |
||
| 31 | $data['primaryKey'] = $this->describe->getPrimaryKey($data['name']); |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Generates set of code based on data. |
||
| 36 | * |
||
| 37 | * @return array |
||
| 38 | */ |
||
| 39 | public function generate() |
||
| 75 | } |
||
| 76 | } |
||
| 77 |