Completed
Pull Request — master (#52)
by
unknown
02:06
created

UserInvitedToTeam::getInvite()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Mpociot\Teamwork\Events;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Queue\SerializesModels;
7
8
class UserInvitedToTeam
9
{
10
    use SerializesModels;
11
12
    /**
13
     * @type Model
14
     */
15
    protected $invite;
16
17
    public function __construct($invite)
18
    {
19
        $this->invite = $invite;
20
    }
21
22
    /**
23
     * @return Model
24
     */
25
    public function getInvite()
26
    {
27
        return $this->invite;
28
    }
29
30
    /**
31
     * @return int
32
     */
33
    public function getTeamId()
34
    {
35
        return $this->team_id;
0 ignored issues
show
Bug introduced by
The property team_id does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
36
    }
37
}