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

RecipeWasCreated::getEntity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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