Passed
Push — master ( d265e3...e69457 )
by Christophe
05:00
created

Table::setSortAscending()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
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
     * @param bool $sortAscending
27
     *
28
     * @return $this
29
     */
30 1
    public function setSortAscending($sortAscending)
31
    {
32 1
        $this->sortAscending = $sortAscending;
33
34 1
        return $this;
35
    }
36
37
    /**
38
     * @param int $sortColumn
39
     *
40
     * @return $this
41
     */
42 1
    public function setSortColumn($sortColumn)
43
    {
44 1
        $this->sortColumn = $sortColumn;
45
46 1
        return $this;
47
    }
48
}
49