GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Setup Failed
Push — master ( 78f8b7...0f754d )
by Elemér
04:15
created

RowWrapper::end()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace Erelke\TwigSpreadsheetBundle\Wrapper;
4
5
use LogicException;
6
use Twig\Environment as Twig_Environment;
7
8
/**
9
 * Class SheetWrapper.
10
 */
11
class RowWrapper extends BaseWrapper
12
{
13
    /**
14
     * @var SheetWrapper
15
     */
16
    protected $sheetWrapper;
17
18
    /**
19
     * RowWrapper constructor.
20
     *
21
     * @param array             $context
22
     * @param Twig_Environment $environment
23
     * @param SheetWrapper      $sheetWrapper
24
     */
25
    public function __construct(array $context, Twig_Environment $environment, SheetWrapper $sheetWrapper)
26
    {
27
        parent::__construct($context, $environment);
28
29
        $this->sheetWrapper = $sheetWrapper;
30
    }
31
32
    /**
33
     * @param null|int $index
34
     *
35
     * @throws LogicException
36
     */
37
    public function start(int $index = null)
38
    {
39
        if ($this->sheetWrapper->getObject() === null) {
40
            throw new LogicException();
41
        }
42
43
        if ($index === null) {
44
            $this->sheetWrapper->increaseRow();
45
        } else {
46
            $this->sheetWrapper->setRow($index);
47
        }
48
    }
49
50
    /**
51
     * @throws LogicException
52
     */
53
    public function end()
54
    {
55
        if ($this->sheetWrapper->getObject() === null) {
56
            throw new LogicException();
57
        }
58
59
        $this->sheetWrapper->setColumn(null);
60
    }
61
}
62