1 | <?php |
||
14 | class CodeGeneratorService extends AbstractService { |
||
15 | |||
16 | private $codegen; |
||
|
|||
17 | |||
18 | public function getCodegenFile() { |
||
21 | 7 | ||
22 | /** |
||
23 | * Returns codegen from project |
||
24 | * |
||
25 | * @throws JsonEmptyException |
||
26 | * @throws \RuntimeException |
||
27 | * @return CodegenSchema |
||
28 | */ |
||
29 | public function getCodegen() { |
||
32 | 7 | ||
33 | 7 | /** |
|
34 | 7 | * Adds authors to the docblock of the given struct |
|
35 | * |
||
36 | 7 | * @param AbstractPhpStruct $struct |
|
37 | 12 | * @param PackageSchema $package |
|
38 | */ |
||
39 | public function addAuthors(AbstractPhpStruct $struct, PackageSchema $package = null) { |
||
57 | |||
58 | /** |
||
59 | * Returns code for hydrating a propel model |
||
60 | * |
||
61 | * @param string $modelName |
||
62 | * @return string |
||
63 | */ |
||
64 | public function getWriteFields($modelName) { |
||
83 | 15 | ||
84 | /** |
||
85 | * Returns the fields for a model |
||
86 | * |
||
87 | * @param string $modelName |
||
88 | * @return array |
||
89 | */ |
||
90 | public function getReadFields($modelName) { |
||
109 | |||
110 | /** |
||
111 | 5 | * Returns computed model fields |
|
112 | 5 | * |
|
113 | 5 | * @param Table $table |
|
114 | * @return array<string> |
||
115 | 5 | */ |
|
116 | 5 | public function getComputedFields(Table $table) { |
|
135 | |||
136 | /** |
||
137 | * Returns all attributes that aren't written onto a model (because manually filter or computed) |
||
138 | * |
||
139 | * @param Table $model |
||
140 | * @return array |
||
141 | */ |
||
142 | public function getWriteFilter(Table $model) { |
||
149 | |||
150 | 5 | /** |
|
151 | 5 | * Helper to represent an array as php code |
|
152 | * |
||
153 | * @param array $array |
||
154 | 5 | * @return string |
|
155 | 5 | */ |
|
156 | 5 | public function arrayToCode(array $array) { |
|
168 | |||
169 | public function mapToCode(array $array) { |
||
181 | |||
182 | 2 | /** |
|
183 | * Returns the filename for a given struct |
||
184 | * |
||
185 | * @param AbstractPhpStruct $struct |
||
186 | 2 | * @return string |
|
187 | */ |
||
188 | public function getFilename(AbstractPhpStruct $struct) { |
||
202 | |||
203 | /** |
||
204 | 15 | * Returns a file object for a given struct |
|
205 | 15 | * |
|
206 | 15 | * @param AbstractPhpStruct $struct |
|
207 | * @return File |
||
208 | 15 | */ |
|
209 | public function getFile(AbstractPhpStruct $struct) { |
||
212 | |||
213 | public function dumpStruct(AbstractPhpStruct $struct, $overwrite = false) { |
||
229 | } |
||
230 |
This check marks private properties in classes that are never used. Those properties can be removed.