Completed
Pull Request — master (#35)
by Aleh
03:05
created

FunctionScope   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 2
1
<?php
2
3
namespace Padawan\Domain\Scope;
4
5
use Padawan\Domain\Project\Node\FunctionData;
6
use Padawan\Domain\Scope;
7
8
class FunctionScope extends AbstractChildScope
9
{
10
    /** @var FunctionData */
11
    private $function;
12
    public function __construct(Scope $scope, FunctionData $function)
13
    {
14
        parent::__construct($scope);
15
        $this->function = $function;
16
        $scope->addFunction($function);
17
        foreach ($function->arguments as $param) {
18
            $this->addVar($param);
19
        }
20
    }
21
}
22