Code Duplication    Length = 8-8 lines in 2 locations

src/DataSource/DoctrineCollectionDataSource.php 2 locations

@@ 136-143 (lines=8) @@
133
	{
134
		$values = $conditions[$filter->getColumn()];
135
136
		if ($value_from = $values['from']) {
137
			$date_from = \DateTime::createFromFormat($filter->getPhpFormat(), $value_from)
138
				->setTime(0, 0, 0)
139
				->format('Y-m-d H:i:s');
140
141
			$expr = Criteria::expr()->gte($filter->getColumn(), $date_from);
142
			$this->criteria->andWhere($expr);
143
		}
144
145
		if ($value_to = $values['to']) {
146
			$date_to = \DateTime::createFromFormat($filter->getPhpFormat(), $value_to)
@@ 145-152 (lines=8) @@
142
			$this->criteria->andWhere($expr);
143
		}
144
145
		if ($value_to = $values['to']) {
146
			$date_to = \DateTime::createFromFormat($filter->getPhpFormat(), $value_to)
147
				->setTime(23, 59, 59)
148
				->format('Y-m-d H:i:s');
149
150
			$expr = Criteria::expr()->lte($filter->getColumn(), $date_to);
151
			$this->criteria->andWhere($expr);
152
		}
153
	}
154
155