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.

Code Duplication    Length = 42-42 lines in 2 locations

src/ZfTable/Decorator/Cell/AttrDecorator.php 1 location

@@ 13-54 (lines=42) @@
10
11
use ZfTable\Decorator\Exception;
12
13
class AttrDecorator extends AbstractCellDecorator
14
{
15
16
    protected $attr;
17
18
19
    /**
20
     * Constructor
21
     *
22
     * @param array $attributes
23
     * @throws Exception\InvalidArgumentException
24
     */
25
    public function __construct($attributes)
26
    {
27
        $this->setAttr($attributes);
28
    }
29
30
    /**
31
     * Rendering decorator
32
     * @param string $context
33
     * @return string
34
     */
35
    public function render($context)
36
    {
37
        if (count($this->attr) > 0) {
38
            foreach ($this->attr as $name => $value) {
39
                $this->getCell()->addAttr($name, $value);
40
            }
41
        }
42
        return $context;
43
    }
44
45
    public function getAttr()
46
    {
47
        return $this->attr;
48
    }
49
50
    public function setAttr($attr)
51
    {
52
        $this->attr = $attr;
53
    }
54
}
55

src/ZfTable/Decorator/Cell/VarAttrDecorator.php 1 location

@@ 13-54 (lines=42) @@
10
11
use ZfTable\Decorator\Exception;
12
13
class VarAttrDecorator extends AbstractCellDecorator
14
{
15
16
    protected $attr;
17
18
19
    /**
20
     * Constructor
21
     *
22
     * @param array $options
23
     */
24
    public function __construct($options)
25
    {
26
        $this->setAttr($options);
27
    }
28
29
    /**
30
     * Rendering decorator
31
     *
32
     * @param string $context
33
     * @return string
34
     */
35
    public function render($context)
36
    {
37
        if (count($this->attr) > 0) {
38
            foreach ($this->attr as $name => $value) {
39
                $this->getCell()->addVarAttr($name, $value);
40
            }
41
        }
42
        return $context;
43
    }
44
45
    public function getAttr()
46
    {
47
        return $this->attr;
48
    }
49
50
    public function setAttr($attr)
51
    {
52
        $this->attr = $attr;
53
    }
54
}
55