Code Duplication    Length = 8-8 lines in 2 locations

src/DataSource/DoctrineCollectionDataSource.php 2 locations

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