ServesFeatures   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 17
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A serve() 0 3 1
1
<?php
2
3
namespace Anfischer\Foundation\Feature\Concerns;
4
5
use Anfischer\Foundation\Job\Concerns\MarshalsJobs;
6
use Illuminate\Support\Collection;
7
use Illuminate\Foundation\Bus\DispatchesJobs;
8
9
trait ServesFeatures
10
{
11
    use MarshalsJobs;
12
    use DispatchesJobs;
13
14
    /**
15
     * Serve the given feature with the given arguments.
16
     *
17
     * @param $feature
18
     * @param array $arguments
19
     *
20
     * @return mixed
21
     * @throws \Exception
22
     */
23 10
    public function serve($feature, array $arguments = [])
24
    {
25 10
        return $this->dispatch($this->marshal($feature, new Collection($arguments)));
26
    }
27
}
28