Code Duplication    Length = 16-16 lines in 3 locations

src/AggregationFunction/TDataGridAggregationFunction.php 3 locations

@@ 88-103 (lines=16) @@
85
	 * @param  IDataSource $dataSource
86
	 * @return void
87
	 */
88
	public function beforeDataModelFilter(IDataSource $dataSource)
89
	{
90
		if ($this->multipleAggregationFunction) {
91
			if ($this->multipleAggregationFunction->getFilterDataType() === IAggregationFunction::DATA_TYPE_ALL) {
92
				$dataSource->processAggregation([$this->multipleAggregationFunction, 'processDataSource']);
93
			}
94
95
			return;
96
		}
97
98
		foreach ($this->aggregationFunctions as $aggregationFunction) {
99
			if ($aggregationFunction->getFilterDataType() === IAggregationFunction::DATA_TYPE_ALL) {
100
				$dataSource->processAggregation([$aggregationFunction, 'processDataSource']);
101
			}
102
		}
103
	}
104
105
106
	/**
@@ 110-125 (lines=16) @@
107
	 * @param  IDataSource $dataSource
108
	 * @return void
109
	 */
110
	public function afterDataModelFilter(IDataSource $dataSource)
111
	{
112
		if ($this->multipleAggregationFunction) {
113
			if ($this->multipleAggregationFunction->getFilterDataType() === IAggregationFunction::DATA_TYPE_FILTERED) {
114
				$dataSource->processAggregation([$this->multipleAggregationFunction, 'processDataSource']);
115
			}
116
117
			return;
118
		}
119
120
		foreach ($this->aggregationFunctions as $aggregationFunction) {
121
			if ($aggregationFunction->getFilterDataType() === IAggregationFunction::DATA_TYPE_FILTERED) {
122
				$dataSource->processAggregation([$aggregationFunction, 'processDataSource']);
123
			}
124
		}
125
	}
126
127
128
	/**
@@ 132-147 (lines=16) @@
129
	 * @param  IDataSource $dataSource
130
	 * @return void
131
	 */
132
	public function afterDataModelPaginated(IDataSource $dataSource)
133
	{
134
		if ($this->multipleAggregationFunction) {
135
			if ($this->multipleAggregationFunction->getFilterDataType() === IAggregationFunction::DATA_TYPE_PAGINATED) {
136
				$dataSource->processAggregation([$this->multipleAggregationFunction, 'processDataSource']);
137
			}
138
139
			return;
140
		}
141
142
		foreach ($this->aggregationFunctions as $aggregationFunction) {
143
			if ($aggregationFunction->getFilterDataType() === IAggregationFunction::DATA_TYPE_PAGINATED) {
144
				$dataSource->processAggregation([$aggregationFunction, 'processDataSource']);
145
			}
146
		}
147
	}
148
149
150
	/**