Code Duplication    Length = 23-23 lines in 5 locations

lib/Doctrine/ORM/Query/AST/Functions/AvgFunction.php 1 location

@@ 32-54 (lines=23) @@
29
 * @since   2.6
30
 * @author  Mathew Davies <[email protected]>
31
 */
32
final class AvgFunction extends FunctionNode
33
{
34
    /**
35
     * @var AggregateExpression
36
     */
37
    private $aggregateExpression;
38
39
    /**
40
     * @inheritDoc
41
     */
42
    public function getSql(SqlWalker $sqlWalker): string
43
    {
44
        return $this->aggregateExpression->dispatch($sqlWalker);
45
    }
46
47
    /**
48
     * @inheritDoc
49
     */
50
    public function parse(Parser $parser): void
51
    {
52
        $this->aggregateExpression = $parser->AggregateExpression();
53
    }
54
}
55

lib/Doctrine/ORM/Query/AST/Functions/CountFunction.php 1 location

@@ 32-54 (lines=23) @@
29
 * @since   2.6
30
 * @author  Mathew Davies <[email protected]>
31
 */
32
final class CountFunction extends FunctionNode
33
{
34
    /**
35
     * @var AggregateExpression
36
     */
37
    private $aggregateExpression;
38
39
    /**
40
     * @inheritDoc
41
     */
42
    public function getSql(SqlWalker $sqlWalker): string
43
    {
44
        return $this->aggregateExpression->dispatch($sqlWalker);
45
    }
46
47
    /**
48
     * @inheritDoc
49
     */
50
    public function parse(Parser $parser): void
51
    {
52
        $this->aggregateExpression = $parser->AggregateExpression();
53
    }
54
}
55

lib/Doctrine/ORM/Query/AST/Functions/MaxFunction.php 1 location

@@ 32-54 (lines=23) @@
29
 * @since   2.6
30
 * @author  Mathew Davies <[email protected]>
31
 */
32
final class MaxFunction extends FunctionNode
33
{
34
    /**
35
     * @var AggregateExpression
36
     */
37
    private $aggregateExpression;
38
39
    /**
40
     * @inheritDoc
41
     */
42
    public function getSql(SqlWalker $sqlWalker): string
43
    {
44
        return $this->aggregateExpression->dispatch($sqlWalker);
45
    }
46
47
    /**
48
     * @inheritDoc
49
     */
50
    public function parse(Parser $parser): void
51
    {
52
        $this->aggregateExpression = $parser->AggregateExpression();
53
    }
54
}
55

lib/Doctrine/ORM/Query/AST/Functions/MinFunction.php 1 location

@@ 32-54 (lines=23) @@
29
 * @since   2.6
30
 * @author  Mathew Davies <[email protected]>
31
 */
32
final class MinFunction extends FunctionNode
33
{
34
    /**
35
     * @var AggregateExpression
36
     */
37
    private $aggregateExpression;
38
39
    /**
40
     * @inheritDoc
41
     */
42
    public function getSql(SqlWalker $sqlWalker): string
43
    {
44
        return $this->aggregateExpression->dispatch($sqlWalker);
45
    }
46
47
    /**
48
     * @inheritDoc
49
     */
50
    public function parse(Parser $parser): void
51
    {
52
        $this->aggregateExpression = $parser->AggregateExpression();
53
    }
54
}
55

lib/Doctrine/ORM/Query/AST/Functions/SumFunction.php 1 location

@@ 32-54 (lines=23) @@
29
 * @since   2.6
30
 * @author  Mathew Davies <[email protected]>
31
 */
32
final class SumFunction extends FunctionNode
33
{
34
    /**
35
     * @var AggregateExpression
36
     */
37
    private $aggregateExpression;
38
39
    /**
40
     * @inheritDoc
41
     */
42
    public function getSql(SqlWalker $sqlWalker): string
43
    {
44
        return $this->aggregateExpression->dispatch($sqlWalker);
45
    }
46
47
    /**
48
     * @inheritDoc
49
     */
50
    public function parse(Parser $parser): void
51
    {
52
        $this->aggregateExpression = $parser->AggregateExpression();
53
    }
54
}
55