NavHorizontal::axisYMove()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the ReportBundle package
5
 * 
6
 * (c) symball <http://simonball.me>
7
 * 
8
 * For the full copyright and license information, please view the LICENSE file 
9
 * that was distributed with this source code.
10
 */
11
12
namespace Symball\ReportBundle\Service;
13
14
use Symball\ReportBundle\Service\Nav;
15
use Symball\ReportBundle\Interfaces\NavInterface;
16
17
/**
18
 * Handle the navigation pointer when data sets will go right and data points
19
 * will go down
20
 *
21
 * @author Simon Ball <simonball at simonball dot me>
22
 */
23
class NavHorizontal extends Nav implements NavInterface
24
{
25
26
    const TYPE = 'horizontal';
27
28
    /**
29
     * Move the pointer to the starting area of the "next" data set.
30
     *
31
     * @return $this
32
     */
33
    public function next()
34
    {
35
        $this->columnCurrent = $this->columnSetStart;
36
        ++$this->rowCurrent;
37
        $this->rowSetStart = $this->rowCurrent;
38
39
        return $this;
40
    }
41
42
    /**
43
     * Move pointer along the current X axis. For horizontal nav, this is down
44
     *
45
     * @param integer $placesToMove
46
     * @return $this
47
     */
48
    public function axisXMove($placesToMove = 1)
49
    {
50
        $this->down($placesToMove);
51
52
        return $this;
53
    }
54
55
    /**
56
     * Move pointer along the current Y axis. For horizontal nav, this is right
57
     *
58
     * @param integer $placesToMove
59
     * @return $this
60
     */
61
    public function axisYMove($placesToMove = 1)
62
    {
63
        $this->right($placesToMove);
64
65
        return $this;
66
    }
67
}
68