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