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.
Completed
Push — master ( 5f6b2b...ad565c )
by Mewes
02:16
created

XlsRowWrapper   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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