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 = 46-46 lines in 2 locations

tests/src/Evaluator/LogicalAndTest.php 1 location

@@ 15-60 (lines=46) @@
12
     * @author Kristjan Siimson <[email protected]>
13
     * @package Evaluator\Tests
14
     */
15
    class LogicalAndTest extends LogicalEvaluatorTest
16
    {
17
        /**
18
         * @var Evaluator
19
         */
20
        private $firstMock;
21
22
        /**
23
         * @var Evaluator
24
         */
25
        private $secondMock;
26
27
        /**
28
         * @uses Evaluator
29
         */
30
        public function setUp()
31
        {
32
            $this->firstMock = $this->createMock();
33
            $this->secondMock = $this->createMock();
34
        }
35
36
        /**
37
         * @dataProvider logicalAndProvider
38
         * @param bool $result
39
         * @param bool $left
40
         * @param bool $right
41
         */
42
        public function testLogicalAndIsTrueIfBothSidesAreTrue($result, $left, $right)
43
        {
44
            $this->mockReturns($this->firstMock, $left);
45
            $this->mockReturns($this->secondMock, $right);
46
47
            $evaluator = new LogicalAnd($this->firstMock, $this->secondMock);
48
            $this->assertEquals($result, $evaluator->is('2014-01-01'));
49
        }
50
51
        public function logicalAndProvider()
52
        {
53
            return array(
54
                array(true, true, true),
55
                array(false, true, false),
56
                array(false, false, false),
57
                array(false, false, true)
58
            );
59
        }
60
    }
61
}

tests/src/Evaluator/LogicalOrTest.php 1 location

@@ 15-60 (lines=46) @@
12
     * @author Kristjan Siimson <[email protected]>
13
     * @package Evaluator\Tests
14
     */
15
    class LogicalOrTest extends LogicalEvaluatorTest
16
    {
17
        /**
18
         * @var Evaluator
19
         */
20
        protected $firstMock;
21
22
        /**
23
         * @var Evaluator
24
         */
25
        protected $secondMock;
26
27
        /**
28
         * @uses Evaluator
29
         */
30
        public function setUp()
31
        {
32
            $this->firstMock = $this->createMock();
33
            $this->secondMock = $this->createMock();
34
        }
35
36
        /**
37
         * @dataProvider logicalOrProvider
38
         * @param bool $result
39
         * @param bool $left
40
         * @param bool $right
41
         */
42
        public function testLogicalAndIsTrueIfBothSidesAreTrue($result, $left, $right)
43
        {
44
            $this->mockReturns($this->firstMock, $left);
45
            $this->mockReturns($this->secondMock, $right);
46
47
            $evaluator = new LogicalOr($this->firstMock, $this->secondMock);
48
            $this->assertEquals($result, $evaluator->is('2014-01-01'));
49
        }
50
51
        public function logicalOrProvider()
52
        {
53
            return array(
54
                array(true, true, true),
55
                array(true, true, false),
56
                array(false, false, false),
57
                array(true, false, true)
58
            );
59
        }
60
    }
61
}