Event::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
namespace Overtrue\LaravelFollow\Events;
4
5
use Overtrue\LaravelFollow\UserFollower;
6
7
class Event
8
{
9
    /**
10
     * @var int|string
11
     */
12
    public $followingId;
13
14
    /**
15
     * @var int|string
16
     */
17
    public $followerId;
18
19
    protected UserFollower $relation;
20
21
    public function __construct(UserFollower $relation)
22
    {
23
        $this->relation = $relation;
24
        $this->followerId = $relation->follower_id;
0 ignored issues
show
Bug introduced by
The property follower_id does not exist on Overtrue\LaravelFollow\UserFollower. Did you mean follower_id;?
Loading history...
25
        $this->followingId = $relation->following_id;
0 ignored issues
show
Bug introduced by
The property following_id does not exist on Overtrue\LaravelFollow\UserFollower. Did you mean following_id;?
Loading history...
26
    }
27
}
28