Completed
Pull Request — master (#80)
by John
03:04
created

Bar::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 3
1
<?php declare(strict_types = 1);
2
/*
3
 * This file is part of the KleijnWeb\SwaggerBundle package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace KleijnWeb\SwaggerBundle\Tests\Serialize\Serializer\Stubs;
10
11
class Bar
12
{
13
    /**
14
     * @var float
15
     */
16
    private $b;
17
18
    /**
19
     * @var Meh
20
     */
21
    private $meh;
22
23
    /**
24
     * @var Meh[]
25
     */
26
    private $mehs;
27
28
    /**
29
     * Bar constructor.
30
     *
31
     * @param float $b
32
     * @param Meh   $meh
33
     * @param Meh[] ...$mehs
34
     */
35
    public function __construct(float $b, Meh $meh, Meh ...$mehs)
36
    {
37
        $this->b    = $b;
38
        $this->meh  = $meh;
39
        $this->mehs = $mehs;
0 ignored issues
show
Documentation Bug introduced by
It seems like $mehs of type array<integer,array<inte...Serializer\Stubs\Meh>>> is incompatible with the declared type array<integer,object<Kle...\Serializer\Stubs\Meh>> of property $mehs.

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...
40
    }
41
}
42