Code Duplication    Length = 10-10 lines in 2 locations

src/Row.php 2 locations

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