Code Duplication    Length = 8-8 lines in 2 locations

src/DataSource/DoctrineDataSource.php 2 locations

@@ 194-201 (lines=8) @@
191
		$value_from = $conditions[$filter->getColumn()]['from'];
192
		$value_to   = $conditions[$filter->getColumn()]['to'];
193
194
		if ($value_from) {
195
			$date_from = DateTimeHelper::tryConvertToDate($value_from, [$filter->getPhpFormat()]);
196
			$date_from->setTime(0, 0, 0);
197
198
			$p = $this->getPlaceholder();
199
200
			$this->data_source->andWhere("$c >= :$p")->setParameter($p, $date_from->format('Y-m-d H:i:s'));
201
		}
202
203
		if ($value_to) {
204
			$date_to = DateTimeHelper::tryConvertToDate($value_to, [$filter->getPhpFormat()]);
@@ 203-210 (lines=8) @@
200
			$this->data_source->andWhere("$c >= :$p")->setParameter($p, $date_from->format('Y-m-d H:i:s'));
201
		}
202
203
		if ($value_to) {
204
			$date_to = DateTimeHelper::tryConvertToDate($value_to, [$filter->getPhpFormat()]);
205
			$date_to->setTime(23, 59, 59);
206
207
			$p = $this->getPlaceholder();
208
209
			$this->data_source->andWhere("$c <= :$p")->setParameter($p, $date_to->format('Y-m-d H:i:s'));
210
		}
211
	}
212
213