Code Duplication    Length = 10-10 lines in 2 locations

src/Row.php 2 locations

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