Completed
Push — master ( 3d4150...00d7a1 )
by Nicolas
03:57
created

EloquentRecipeRepository::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php namespace Modules\Recipe\Repositories\Eloquent;
2
3
use Modules\Recipe\Events\RecipeWasCreated;
4
use Modules\Recipe\Repositories\RecipeRepository;
5
use Modules\Core\Repositories\Eloquent\EloquentBaseRepository;
6
7
class EloquentRecipeRepository extends EloquentBaseRepository implements RecipeRepository
8
{
9
    public function create($data)
10
    {
11
        $recipe = $this->model->create($data);
12
13
        event(new RecipeWasCreated($recipe, $data));
14
15
        return $recipe;
16
    }
17
}
18