Completed
Push — master ( 39b8c1...64acd2 )
by Marius
03:05
created

InvalidGroupByException::getGroupBy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
declare(strict_types=1);
3
4
namespace Paysera\Pagination\Exception;
5
6
class InvalidGroupByException extends PaginationException
7
{
8
    /**
9
     * @var string
10
     */
11
    private $groupBy;
12
13 2
    public function __construct(string $groupBy)
14
    {
15 2
        parent::__construct(sprintf(
16 2
            'Calculating total-count only supported with single group-by, instead provided: "%s"',
17 2
            $groupBy
18
        ));
19 2
        $this->groupBy = $groupBy;
20 2
    }
21
22
    /**
23
     * @return string
24
     */
25
    public function getGroupBy(): string
26
    {
27
        return $this->groupBy;
28
    }
29
}
30