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

RecipeWasCreated   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 35
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getEntity() 0 4 1
A getSubmissionData() 0 4 1
1
<?php namespace Modules\Recipe\Events;
2
3
use Modules\Media\Contracts\StoringMedia;
4
5
class RecipeWasCreated implements StoringMedia
6
{
7
    /**
8
     * @var
9
     */
10
    private $recipe;
11
    /**
12
     * @var
13
     */
14
    private $data;
15
16
    public function __construct($recipe, $data)
17
    {
18
        $this->recipe = $recipe;
19
        $this->data = $data;
20
    }
21
22
    /**
23
     * Return the entity
24
     * @return \Illuminate\Database\Eloquent\Model
25
     */
26
    public function getEntity()
27
    {
28
        return $this->recipe;
29
    }
30
31
    /**
32
     * Return the ALL data sent
33
     * @return array
34
     */
35
    public function getSubmissionData()
36
    {
37
        return $this->data;
38
    }
39
}
40