Code Duplication    Length = 10-10 lines in 2 locations

src/Row.php 2 locations

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