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.

WeekdayTest::weekdayProvider()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 12
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 12
loc 12
rs 9.4285
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
3
namespace Tests\COG\ChronoShifter\Evaluator;
4
5
use COG\ChronoShifter\Evaluator\DayOfWeek;
6
use COG\ChronoShifter\Evaluator\Weekday;
7
8
/**
9
 * @author Kristjan Siimson <[email protected]>
10
 * @package Evaluator\Tests
11
 */
12 View Code Duplication
class WeekdayTest extends \PHPUnit_Framework_TestCase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
13
{
14
    /**
15
     * @dataProvider weekdayProvider
16
     * @param string $date
17
     * @param int $dayOfWeek
18
     * @param bool $result
19
     */
20
    public function testEvaluateDayOfWeek($date, $dayOfWeek, $result)
21
    {
22
        $evaluator = new Weekday($dayOfWeek);
0 ignored issues
show
Unused Code introduced by
The call to Weekday::__construct() has too many arguments starting with $dayOfWeek.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
23
        $this->assertEquals($result, $evaluator->is($date));
24
    }
25
26
    /**
27
     * @return array
28
     */
29
    public function weekdayProvider()
30
    {
31
        return array(
32
            array('2015-01-26', DayOfWeek::MONDAY, true),
33
            array('2015-01-27', DayOfWeek::TUESDAY, true),
34
            array('2015-01-28', DayOfWeek::WEDNESDAY, true),
35
            array('2015-01-29', DayOfWeek::THURSDAY, true),
36
            array('2015-01-30', DayOfWeek::FRIDAY, true),
37
            array('2015-01-31', DayOfWeek::SATURDAY, false),
38
            array('2015-02-01', DayOfWeek::SUNDAY, false),
39
        );
40
    }
41
}
42