Table::setSortAscending()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options\AnnotationChart;
4
5
/**
6
 * @author Christophe Meneses
7
 */
8
class Table
9
{
10
    /**
11
     * If set to true, reverses the order of the annotations table and displays them in ascending order.
12
     *
13
     * @var bool
14
     */
15
    protected $sortAscending;
16
17
    /**
18
     * The column index of the annotations table for which the annotations will be sorted. The index must be either 0,
19
     * for the annotation label column, or 1, for the annotation text column.
20
     *
21
     * @var int
22
     */
23
    protected $sortColumn;
24
25
    /**
26
     * @return $this
27
     */
28 1
    public function setSortAscending(bool $sortAscending)
29
    {
30 1
        $this->sortAscending = $sortAscending;
31
32 1
        return $this;
33
    }
34
35
    /**
36
     * @return $this
37
     */
38 1
    public function setSortColumn(int $sortColumn)
39
    {
40 1
        $this->sortColumn = $sortColumn;
41
42 1
        return $this;
43
    }
44
}
45