EnvironmentBuilder   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 38
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A tearDown() 0 4 1
A getAuthenticationUser() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Visithor package.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * Feel free to edit as you please, and have fun.
10
 *
11
 * @author Marc Morera <[email protected]>
12
 */
13
14
namespace Visithor\Bundle\Tests\FakeBundle\Environment;
15
16
use Symfony\Component\HttpKernel\KernelInterface;
17
18
use Visithor\Bundle\Environment\Interfaces\EnvironmentBuilderInterface;
19
20
/**
21
 * Class EnvironmentBuilder
22
 */
23
class EnvironmentBuilder implements EnvironmentBuilderInterface
24
{
25
    /**
26
     * Set up environment
27
     *
28
     * @param KernelInterface $kernel Kernel
29
     *
30
     * @return $this Self object
31
     */
32
    public function setUp(KernelInterface $kernel)
33
    {
34
        return $this;
35
    }
36
37
    /**
38
     * Tear down environment
39
     *
40
     * @param KernelInterface $kernel Kernel
41
     *
42
     * @return $this Self object
43
     */
44
    public function tearDown(KernelInterface $kernel)
45
    {
46
        return $this;
47
    }
48
49
    /**
50
     * Get authenticated user
51
     *
52
     * @param string $role Role
53
     *
54
     * @return mixed User for authentication
55
     */
56
    public function getAuthenticationUser($role)
57
    {
58
        return 'admin';
59
    }
60
}
61