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.

ActionIterator   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 23
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 2
1
<?php
2
3
namespace Scheduler\Action;
4
5
use Recurr\Recurrence;
6
use DateTimeInterface;
7
use Scheduler\Job\JobInterface;
8
9
/**
10
 * Class ActionIterator
11
 * @package Scheduler
12
 * @author Aleh Hutnikau, <[email protected]>
13
 */
14
class ActionIterator extends \ArrayIterator
15
{
16
17
    /**
18
     * RRuleIterator constructor.
19
     * @param JobInterface $job
20
     * @param DateTimeInterface $after
21
     * @param DateTimeInterface $before
22
     * @param bool $inc
23
     * @throws
24
     */
25 13
    public function __construct(JobInterface $job, DateTimeInterface $after, DateTimeInterface $before, $inc = true)
26
    {
27 13
        $dates = $job->getRRule()->getRecurrences($after, $before, $inc);
28 13
        $actions = [];
29
        /** @var Recurrence $recurrence */
30 13
        foreach ($dates as $recurrence) {
31 12
            $actions[] = new CallableAction($job, $recurrence);
32 13
        }
33 13
        parent::__construct($actions);
34 13
    }
35
36
}