| @@ 102-112 (lines=11) @@ | ||
| 99 | * |
|
| 100 | * @return string |
|
| 101 | */ |
|
| 102 | private function generateDocumentProperties(array $metadata) |
|
| 103 | { |
|
| 104 | $lines = []; |
|
| 105 | ||
| 106 | foreach ($metadata['properties'] as $property) { |
|
| 107 | $lines[] = $this->generatePropertyDocBlock($property); |
|
| 108 | $lines[] = $this->spaces . 'private $' . $property['field_name'] . ";\n"; |
|
| 109 | } |
|
| 110 | ||
| 111 | return implode("\n", $lines); |
|
| 112 | } |
|
| 113 | ||
| 114 | /** |
|
| 115 | * Generates document methods |
|
| @@ 121-131 (lines=11) @@ | ||
| 118 | * |
|
| 119 | * @return string |
|
| 120 | */ |
|
| 121 | private function generateDocumentMethods(array $metadata) |
|
| 122 | { |
|
| 123 | $lines = []; |
|
| 124 | ||
| 125 | foreach ($metadata['properties'] as $property) { |
|
| 126 | $lines[] = $this->generateDocumentMethod($property, 'set') . "\n"; |
|
| 127 | $lines[] = $this->generateDocumentMethod($property, 'get') . "\n"; |
|
| 128 | } |
|
| 129 | ||
| 130 | return implode("\n", $lines); |
|
| 131 | } |
|
| 132 | ||
| 133 | /** |
|
| 134 | * Generates document method |
|