ExtraLazyResponseCollection   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 35
ccs 9
cts 9
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getIterator() 0 4 1
A getInnerCollection() 0 4 1
A getResponse() 0 4 1
1
<?php
2
3
namespace ScayTrase\Api\Rpc\Decorators;
4
5
use ScayTrase\Api\Rpc\ResponseCollectionInterface;
6
use ScayTrase\Api\Rpc\RpcRequestInterface;
7
8
final class ExtraLazyResponseCollection implements \IteratorAggregate, ResponseCollectionInterface
9
{
10
    /** @var LazyResponseCollection */
11
    private $collection;
12
13
    /**
14
     * ExtraLazyResponseCollection constructor.
15
     *
16
     * @param LazyResponseCollection $collection
17
     */
18 4
    public function __construct(LazyResponseCollection $collection)
19
    {
20 4
        $this->collection = $collection;
21 4
    }
22
23
    /** {@inheritdoc} */
24 2
    public function getIterator()
25
    {
26 2
        return $this->collection;
27
    }
28
29
    /**
30
     * @return LazyResponseCollection
31
     */
32 4
    public function getInnerCollection()
33
    {
34 4
        return $this->collection;
35
    }
36
37
    /** {@inheritdoc} */
38 1
    public function getResponse(RpcRequestInterface $request)
39
    {
40 1
        return new ExtraLazyResponseProxy($request, $this->collection);
41
    }
42
}
43