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   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 87.5%

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 2
dl 0
loc 51
ccs 14
cts 16
cp 0.875
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A start() 0 12 3
A end() 0 8 2
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