Code Duplication    Length = 6-6 lines in 2 locations

src/IPub/Forms/Forms/TEntityContainer.php 2 locations

@@ 136-141 (lines=6) @@
133
134
			} else if ($component instanceof Forms\Container) {
135
				if (($classMetadata->hasField($name) || $classMetadata->hasAssociation($name)) && $value = $classMetadata->getFieldValue($entity, $name)) {
136
					if (is_object($value) && $this->isEntity($value)) {
137
						$this->bindEntity($component, $value, $erase);
138
139
					} else {
140
						$component->setValues($value, $erase);
141
					}
142
143
				} else {
144
					$methodName = 'get' . ucfirst($name);
@@ 147-152 (lines=6) @@
144
					$methodName = 'get' . ucfirst($name);
145
146
					if (method_exists($entity, $methodName) && $value = call_user_func([$entity, $methodName])) {
147
						if (is_object($value) && $this->isEntity($value)) {
148
							$this->bindEntity($component, $value, $erase);
149
150
						} else {
151
							$component->setValues($value, $erase);
152
						}
153
154
					} else {
155
						if ($erase) {