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.

DomainEventStream::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
namespace SmoothPhp\Domain;
3
4
use ArrayIterator;
5
use SmoothPhp\Contracts\Domain\DomainEventStream as DomainEventStreamInterface;
6
7
/**
8
 * Class DomainEventStream
9
 * @package SmoothPhp\Domain
10
 * @author Simon Bennett <[email protected]>
11
 */
12
final class DomainEventStream implements DomainEventStreamInterface
13
{
14
    /**
15
     * @var array
16
     */
17
    private $events;
18
19
    /**
20
     * @param \SmoothPhp\Contracts\Domain\DomainMessage[] $events
21
     */
22 24
    public function __construct($events)
23
    {
24 24
        $this->events = $events;
25 24
    }
26
27
    /**
28
     * @return ArrayIterator
29
     */
30 24
    public function getIterator()
31
    {
32 24
        return new ArrayIterator($this->events);
33
    }
34
}