Completed
Push — master ( e2a3b3...5d4b38 )
by wen
02:54
created

ElementFactory::makeClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
4
namespace Sco\Admin\Elements;
5
6
use Illuminate\Foundation\Application;
7
use Sco\Admin\Contracts\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