Code Duplication    Length = 8-8 lines in 2 locations

src/DataSource/DoctrineCollectionDataSource.php 2 locations

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