Completed
Push — master ( 0e6a09...ebc724 )
by wen
02:37
created

ElementFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
1
<?php
2
3
4
namespace Sco\Admin\Form\Elements;
5
6
use Illuminate\Foundation\Application;
7
use Sco\Admin\Contracts\Form\Elements\ElementFactoryInterface;
8
use Sco\Admin\Traits\AliasBinder;
9
10
/**
11
 * Class ElementFactory
12
 * @method Text text($name, $title)
13
 * @method Select select($name, $title)
14
 */
15
class ElementFactory implements ElementFactoryInterface
16
{
17
    use AliasBinder;
18
19
    protected $app;
20
21
    public function __construct(Application $app)
22
    {
23
        $this->app = $app;
24
25
        $this->registerAliases([
26
            'text'   => Text::class,
27
            'select' => Select::class,
28
        ]);
29
    }
30
}
31