Code Duplication    Length = 6-6 lines in 2 locations

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

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