Completed
Pull Request — master (#1)
by Bogdan
06:53 queued 03:12
created

ThrowSpecList::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php declare(strict_types=1);
2
3
/*
4
 * This file is part of the pinepain/js-sandbox PHP library.
5
 *
6
 * Copyright (c) 2016-2017 Bogdan Padalko <[email protected]>
7
 *
8
 * Licensed under the MIT license: http://opensource.org/licenses/MIT
9
 *
10
 * For the full copyright and license information, please view the
11
 * LICENSE file that was distributed with this source or visit
12
 * http://opensource.org/licenses/MIT
13
 */
14
15
16
namespace Pinepain\JsSandbox\Specs\ThrowSpec;
17
18
19
class ThrowSpecList implements ThrowSpecListInterface
20
{
21
    /**
22
     * @var ThrowSpecInterface[]
23
     */
24
    private $specs;
25
26
    /**
27
     * @param ThrowSpecInterface[] ...$specs
28
     */
29 8
    public function __construct(ThrowSpecInterface ...$specs)
30
    {
31 8
        $this->specs = $specs;
0 ignored issues
show
Documentation Bug introduced by
It seems like $specs of type array<integer,array<inte...c\ThrowSpecInterface>>> is incompatible with the declared type array<integer,object<Pin...ec\ThrowSpecInterface>> of property $specs.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
32 8
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37 2
    public function getThrowSpecs(): array
38
    {
39 2
        return $this->specs;
40
    }
41
}
42