ServesFeatures::serve()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 1
nc 1
nop 2
crap 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