Failed Conditions
Push — master ( 9327e7...7f99bf )
by Vladimir
04:21
created

Adder::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQL\Tests\Executor\TestClasses;
6
7
class Adder
8
{
9
    /** @var float */
10
    public $num;
11
12
    /** @var callable */
13
    public $test;
14
15
    public function __construct(float $num)
16
    {
17
        $this->num = $num;
18
19
        $this->test = function ($source, $args, $context) {
20
            return $this->num + $args['addend1'] + $context['addend2'];
21
        };
22
    }
23
}
24