Completed
Pull Request — master (#14)
by
unknown
04:32
created

ComponentFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 15
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
     * Get the evaluated view contents for the given component.
12
     *
13
     * @param  string  $component
14
     * @param  array   $data
15
     * @return \Illuminate\Contracts\Support\Renderable
16
     */
17
    public function make($component, $data = [])
18
    {
19
        return new ComponentView(app($component, $data));
20
    }
21
}
22