Code Duplication    Length = 10-10 lines in 2 locations

src/Row.php 2 locations

@@ 139-148 (lines=10) @@
136
		$value = $item;
137
138
		while ($property = array_shift($properties)) {
139
			if (!isset($value->{$property})) {
140
				if ($this->datagrid->strict_entity_property) {
141
					throw new DataGridException(sprintf(
142
						'Target Property [%s] is not an object or is empty, trying to get [%s]',
143
						$value, str_replace('.', '->', $key)
144
					));
145
				}
146
147
				return NULL;
148
			}
149
150
			$value = $value->{$property};
151
		}
@@ 170-179 (lines=10) @@
167
		$accessor = PropertyAccessHelper::getAccessor();
168
169
		while ($property = array_shift($properties)) {
170
			if (!is_object($value) && !$value) {
171
				if ($this->datagrid->strict_entity_property) {
172
					throw new DataGridException(sprintf(
173
						'Target Property [%s] is not an object or is empty, trying to get [%s]',
174
						$value, str_replace('.', '->', $key)
175
					));
176
				}
177
178
				return NULL;
179
			}
180
181
			$value = $accessor->getValue($value, $property);
182
		}