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 = 44-52 lines in 3 locations

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

@@ 13-56 (lines=44) @@
10
11
use ZfTable\Decorator\Exception;
12
13
class ClassDecorator extends AbstractCellDecorator
14
{
15
16
    /**
17
     * @var array
18
     */
19
    protected $class;
20
21
    /**
22
     * Constructor
23
     *
24
     * @param mixed $options
25
     */
26
    public function __construct($options)
27
    {
28
        $this->setClass($options['class']);
29
    }
30
31
    /**
32
     * Rendering decorator
33
     * @param string $context
34
     * @return string
35
     */
36
    public function render($context)
37
    {
38
        if (count($this->class) > 0 && is_array($this->class)) {
39
            foreach ($this->class as $class) {
40
                $this->getCell()->addClass($class);
41
            }
42
        }
43
        return $context;
44
    }
45
46
    public function setClass($class)
47
    {
48
        $this->class = (is_array($class)) ? $class : explode(' ', $class);
49
        return $this;
50
    }
51
52
    public function getClass()
53
    {
54
        return $this->class;
55
    }
56
}
57

src/ZfTable/Decorator/Header/ClassDecorator.php 1 location

@@ 11-62 (lines=52) @@
8
9
namespace ZfTable\Decorator\Header;
10
11
class ClassDecorator extends AbstractCellDecorator
12
{
13
14
    /**
15
     * Class
16
     * @var array
17
     */
18
    protected $class;
19
20
    public function __construct($options)
21
    {
22
        $this->setClass($options['class']);
23
    }
24
25
    /**
26
     * Rendering decorator
27
     *
28
     * @param string $context
29
     * @return string
30
     */
31
    public function render($context)
32
    {
33
        if (count($this->class) > 0 && is_array($this->class)) {
34
            foreach ($this->class as $class) {
35
                $this->getCell()->addClass($class);
36
            }
37
        }
38
        return $context;
39
    }
40
41
    /**
42
     * Set class
43
     *
44
     * @param string $class
45
     * @return $this
46
     */
47
    public function setClass($class)
48
    {
49
        $this->class = (is_array($class)) ? $class : explode(' ', $class);
50
        return $this;
51
    }
52
53
    /**
54
     * Get class
55
     *
56
     * @return null|array
57
     */
58
    public function getClass()
59
    {
60
        return $this->class;
61
    }
62
}
63

src/ZfTable/Decorator/Row/ClassDecorator.php 1 location

@@ 11-59 (lines=49) @@
8
9
namespace ZfTable\Decorator\Row;
10
11
class ClassDecorator extends AbstractRowDecorator
12
{
13
14
    /**
15
     * Class
16
     * @var array
17
     */
18
    protected $class;
19
20
    public function __construct($options)
21
    {
22
        $this->setClass($options['class']);
23
    }
24
25
    /**
26
     * Rendering decorator
27
     * @param string $context
28
     * @return string
29
     */
30
    public function render($context)
31
    {
32
        if (count($this->class) > 0) {
33
            foreach ($this->class as $class) {
34
                $this->getRow()->addClass($class);
35
            }
36
        }
37
        return $context;
38
    }
39
40
    /**
41
     *
42
     * @param string|array $class
43
     * @return $this
44
     */
45
    public function setClass($class)
46
    {
47
        $this->class = (is_array($class)) ? $class : explode(' ', $class);
48
        return $this;
49
    }
50
51
    /**
52
     *
53
     * @return null|array
54
     */
55
    public function getClass()
56
    {
57
        return $this->class;
58
    }
59
}
60