ParticipantTestHelper   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getParticipantId() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the MilioooMessageBundle package.
5
 *
6
 * (c) Michiel boeckaert <[email protected]>
7
 * This source file is subject to the MIT license that is bundled
8
 * with this source code in the file LICENSE.
9
 */
10
11
namespace Miliooo\Messaging\TestHelpers;
12
13
use Miliooo\Messaging\User\ParticipantInterface;
14
15
/**
16
 * Helper class to create new participants for tests
17
 *
18
 * The constructor argument $participantId is what we return in getParticipantId()
19
 * This makes it easy to create unique participants
20
 *
21
 * @author Michiel Boeckaert <[email protected]>
22
 */
23
class ParticipantTestHelper implements ParticipantInterface
24
{
25
    protected $participantId;
26
27
    /**
28
     * Constructor.
29
     *
30
     * @param string $participantId
31
     */
32
    public function __construct($participantId)
33
    {
34
        $this->participantId = $participantId;
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40
    public function getParticipantId()
41
    {
42
        return $this->participantId;
43
    }
44
}
45