Code Duplication    Length = 8-8 lines in 2 locations

src/DataSource/DoctrineCollectionDataSource.php 2 locations

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