CommunityCreationEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 23
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getFounder() 0 3 1
A getCommunity() 0 3 1
A __construct() 0 4 1
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
}