ModelWasUnliked::__construct()   A
last analyzed

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
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Turahe\Likeable\Events;
4
5
use Turahe\Likeable\Contracts\Likeable as LikeableContract;
6
7
/**
8
 * Class ModelWasUnliked.
9
 */
10
class ModelWasUnliked
11
{
12
    /**
13
     * The unliked model.
14
     *
15
     * @var \Turahe\Likeable\Contracts\Likeable
16
     */
17
    public $model;
18
19
    /**
20
     * User id who unliked model.
21
     *
22
     * @var int
23
     */
24
    public $likerId;
25
26
    /**
27
     * Create a new event instance.
28
     *
29
     * @param \Turahe\Likeable\Contracts\Likeable $likeable
30
     * @param int $likerId
31
     * @return void
32
     */
33
    public function __construct(LikeableContract $likeable, $likerId)
34
    {
35
        $this->model = $likeable;
36
        $this->likerId = $likerId;
37
    }
38
}
39