Completed
Push — master ( 0c1255...399763 )
by Denis
01:54
created

InvokeSpec::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace PhpJsonRpc\Core;
4
5
use PhpJsonRpc\Core\Invoke\AbstractInvoke;
6
7
class InvokeSpec
8
{
9
    /**
10
     * @var bool
11
     */
12
    private $singleCall = false;
13
14
    /**
15
     * @var array
16
     */
17
    private $units;
18
19
    /**
20
     * CallSpecifier constructor.
21
     *
22
     * @param AbstractInvoke[] $units
23
     * @param bool             $singleCall
24
     */
25
    public function __construct(array $units, bool $singleCall)
26
    {
27
        $this->units      = $units;
28
        $this->singleCall = $singleCall;
29
    }
30
31
    /**
32
     * @return boolean
33
     */
34
    public function isSingleCall()
35
    {
36
        return $this->singleCall;
37
    }
38
39
    /**
40
     * @return array
41
     */
42
    public function getUnits()
43
    {
44
        return $this->units;
45
    }
46
}
47