CommunityCreationEvent::getFounder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Event\Community;
4
5
use Symfony\Component\EventDispatcher\Event;
6
7
use App\Entity\Community\Community;
8
use App\Entity\User\User;
9
10
class CommunityCreationEvent extends Event
11
{
12
    /** @var Community **/
13
    protected $community;
14
    /** @var User **/
15
    protected $founder;
16
    
17
    const NAME = 'community.creation';
18
    
19 1
    public function __construct(Community $community, User $founder)
20
    {
21 1
        $this->community = $community;
22 1
        $this->founder = $founder;
23 1
    }
24
    
25 1
    public function getCommunity(): Community
26
    {
27 1
        return $this->community;
28
    }
29
    
30 1
    public function getFounder(): User
31
    {
32 1
        return $this->founder;
33
    }
34
}