Completed
Pull Request — master (#14)
by
unknown
01:13
created

ComponentFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A make() 0 4 1
1
<?php
2
3
namespace Spatie\ViewComponents;
4
5
use Illuminate\View\Concerns\ManagesComponents;
6
7
final class ComponentFactory
8
{
9
    use ManagesComponents;
10
11
    /**
12
     * Get the evaluated view contents for the given component.
13
     *
14
     * @param  string  $component
15
     * @param  array   $data
16
     * @return \Illuminate\Contracts\Support\Renderable
17
     */
18
    public function make($component, $data = [])
19
    {
20
        return new ComponentView(app($component, $data));
21
    }
22
}
23