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 Failed
Pull Request — master (#23)
by
unknown
04:37 queued 19s
created

RowWrapper::start()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 3.0261

Importance

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