Code Duplication    Length = 8-8 lines in 2 locations

src/DataSource/DoctrineDataSource.php 2 locations

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