Code Duplication    Length = 8-8 lines in 2 locations

src/DataSource/DoctrineDataSource.php 2 locations

@@ 182-189 (lines=8) @@
179
		$value_from = $conditions[$filter->getColumn()]['from'];
180
		$value_to   = $conditions[$filter->getColumn()]['to'];
181
182
		if ($value_from) {
183
			$date_from = \DateTime::createFromFormat($filter->getPhpFormat(), $value_from);
184
			$date_from->setTime(0, 0, 0);
185
186
			$p = $this->getPlaceholder();
187
188
			$this->data_source->andWhere("$c >= ?$p")->setParameter($p, $date_from->format('Y-m-d H:i:s'));
189
		}
190
191
		if ($value_to) {
192
			$date_to = \DateTime::createFromFormat($filter->getPhpFormat(), $value_to);
@@ 191-198 (lines=8) @@
188
			$this->data_source->andWhere("$c >= ?$p")->setParameter($p, $date_from->format('Y-m-d H:i:s'));
189
		}
190
191
		if ($value_to) {
192
			$date_to = \DateTime::createFromFormat($filter->getPhpFormat(), $value_to);
193
			$date_to->setTime(23, 59, 59);
194
195
			$p = $this->getPlaceholder();
196
197
			$this->data_source->andWhere("$c <= ?$p")->setParameter($p, $date_to->format('Y-m-d H:i:s'));
198
		}
199
	}
200
201