Code Duplication    Length = 8-8 lines in 2 locations

src/DataSource/DoctrineDataSource.php 2 locations

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