@@ 119-129 (lines=11) @@ | ||
116 | * |
|
117 | * @return string |
|
118 | */ |
|
119 | private function generateDocumentProperties(array $metadata) |
|
120 | { |
|
121 | $lines = []; |
|
122 | ||
123 | foreach ($metadata['properties'] as $property) { |
|
124 | $lines[] = $this->generatePropertyDocBlock($property); |
|
125 | $lines[] = $this->spaces . 'private $' . $property['field_name'] . ";\n"; |
|
126 | } |
|
127 | ||
128 | return implode("\n", $lines); |
|
129 | } |
|
130 | ||
131 | /** |
|
132 | * Generates document methods |
|
@@ 138-148 (lines=11) @@ | ||
135 | * |
|
136 | * @return string |
|
137 | */ |
|
138 | private function generateDocumentMethods(array $metadata) |
|
139 | { |
|
140 | $lines = []; |
|
141 | ||
142 | foreach ($metadata['properties'] as $property) { |
|
143 | $lines[] = $this->generateDocumentMethod($property, $this->setMethodTemplate) . "\n"; |
|
144 | $lines[] = $this->generateDocumentMethod($property, $this->getMethodTemplate) . "\n"; |
|
145 | } |
|
146 | ||
147 | return implode("\n", $lines); |
|
148 | } |
|
149 | ||
150 | /** |
|
151 | * Generates document constructor |