Code Duplication    Length = 8-8 lines in 2 locations

src/DataSource/DoctrineDataSource.php 2 locations

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