Hook   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 66
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 8
c 2
b 0
f 1
lcom 0
cbo 0
dl 0
loc 66
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A beforeSuiteFixturesCleanup() 0 4 1
A afterSuiteFixturesCleanup() 0 4 1
A beforeFeatureFixturesCleanup() 0 4 1
A afterFeatureFixturesCleanup() 0 4 1
A beforeScenarioFixturesCleanup() 0 4 1
A afterScenarioFixturesCleanup() 0 4 1
A beforeStepFixturesCleanup() 0 4 1
A afterStepFixturesCleanup() 0 4 1
1
<?php
2
3
namespace Magefix\Behat;
4
5
/**
6
 * Class Hook
7
 *
8
 * @package Magefix\Behat
9
 * @author  Carlo Tasca <[email protected]>
10
 */
11
trait Hook
12
{
13
    /**
14
     * @BeforeSuite
15
     */
16
    public static function beforeSuiteFixturesCleanup()
17
    {
18
        self::_cleanupFixtureByHook('beforesuite');
19
    }
20
21
    /**
22
     * @AfterSuite
23
     */
24
    public static function afterSuiteFixturesCleanup()
25
    {
26
        self::_cleanupFixtureByHook('aftersuite');
27
    }
28
29
    /**
30
     * @BeforeFeature
31
     */
32
    public static function beforeFeatureFixturesCleanup()
33
    {
34
        self::_cleanupFixtureByHook('beforefeature');
35
    }
36
37
    /**
38
     * @AfterFeature
39
     */
40
    public static function afterFeatureFixturesCleanup()
41
    {
42
        self::_cleanupFixtureByHook('afterfeature');
43
    }
44
45
    /**
46
     * @BeforeScenario
47
     */
48
    public function beforeScenarioFixturesCleanup()
49
    {
50
        self::_cleanupFixtureByHook('beforescenario');
51
    }
52
53
    /**
54
     * @AfterScenario
55
     */
56
    public function afterScenarioFixturesCleanup()
57
    {
58
        self::_cleanupFixtureByHook('afterscenario');
59
    }
60
61
    /**
62
     * @BeforeStep
63
     */
64
    public function beforeStepFixturesCleanup()
65
    {
66
        self::_cleanupFixtureByHook('beforestep');
67
    }
68
69
    /**
70
     * @AfterStep
71
     */
72
    public function afterStepFixturesCleanup()
73
    {
74
        self::_cleanupFixtureByHook('afterstep');
75
    }
76
}
77