Completed
Push — master ( a9b85a...cc544e )
by Dmitry
04:19
created

Application   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 5
dl 0
loc 29
ccs 16
cts 16
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 21 2
A dispatch() 0 4 1
1
<?php
2
3
namespace Basis;
4
5
use League\Container\Container;
6
use League\Container\ReflectionContainer;
7
8
class Application extends Container
9
{
10 7
    public function __construct($root)
11
    {
12 7
        parent::__construct();
13
14 7
        $fs = new Filesystem($this, $root);
15
16 7
        $this->share(Application::class, $this);
17 7
        $this->share(Container::class, $this);
18 7
        $this->share(Framework::class, new Framework($this));
0 ignored issues
show
Unused Code introduced by
The call to Framework::__construct() has too many arguments starting with $this.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
19 7
        $this->share(Filesystem::class, $fs);
20 7
        $this->share(Http::class, new Http($this));
21
22 7
        $this->addServiceProvider(Providers\Tarantool::class);
23 7
        $this->addServiceProvider(Providers\Etcd::class);
24
25 7
        foreach($fs->listClasses('Providers') as $provider) {
26 7
            $this->addServiceProvider($provider);
27
        }
28
29 7
        $this->delegate(new ReflectionContainer());
30 7
    }
31
32 2
    public function dispatch($command, $params = [])
33
    {
34 2
        return $this->get(Runner::class)->dispatch($command, $params);
35
    }
36
}