Code Duplication    Length = 44-44 lines in 2 locations

benchmarks/Compare/Operation/CompareInitTwiceDifferentValueEnumBench.php 1 location

@@ 28-71 (lines=44) @@
25
 * @Revs(2500)
26
 * @Iterations(25)
27
 */
28
class CompareInitTwiceDifferentValueEnumBench implements CompareEnumBench
29
{
30
    public function benchReflectionEnum()
31
    {
32
        $a = AbcRef::A();
33
        $b = AbcRef::B();
34
    }
35
36
    public function benchReflectionEnumNoMagic()
37
    {
38
        $d = DefRef::byValue(DefRef::D);
39
        $e = DefRef::byValue(DefRef::E);
40
    }
41
42
    public function benchExplicitEnum()
43
    {
44
        $a = AbcExp::byValue(AbcExp::A);
45
        $b = AbcExp::byValue(AbcExp::B);
46
    }
47
48
    public function benchMyCLabsEnum()
49
    {
50
        $a = AbcMyClabs::A();
51
        $b = AbcMyClabs::B();
52
    }
53
54
    public function benchMabeEnum()
55
    {
56
        $a = AbcMarcMabe::A();
57
        $b = AbcMarcMabe::B();
58
    }
59
60
    public function benchMabeNoMagicEnum()
61
    {
62
        $d = DefMarcMabe::byValue(DefMarcMabe::D);
63
        $e = DefMarcMabe::byValue(DefMarcMabe::E);
64
    }
65
66
    public function benchHappyTypesEnum()
67
    {
68
        $a = AbcHappyTypes::A();
69
        $b = AbcHappyTypes::B();
70
    }
71
}
72

benchmarks/Compare/Operation/CompareInitTwiceEnumBench.php 1 location

@@ 28-71 (lines=44) @@
25
 * @Revs(2500)
26
 * @Iterations(25)
27
 */
28
class CompareInitTwiceEnumBench implements CompareEnumBench
29
{
30
    public function benchReflectionEnum()
31
    {
32
        $a = AbcRef::A();
33
        $z = AbcRef::A();
34
    }
35
36
    public function benchReflectionEnumNoMagic()
37
    {
38
        $d = DefRef::byValue(DefRef::D);
39
        $z = DefRef::byValue(DefRef::D);
40
    }
41
42
    public function benchExplicitEnum()
43
    {
44
        $a = AbcExp::byValue(AbcExp::A);
45
        $z = AbcExp::byValue(AbcExp::A);
46
    }
47
48
    public function benchMyCLabsEnum()
49
    {
50
        $a = AbcMyClabs::A();
51
        $z = AbcMyClabs::A();
52
    }
53
54
    public function benchMabeEnum()
55
    {
56
        $a = AbcMarcMabe::A();
57
        $z = AbcMarcMabe::A();
58
    }
59
60
    public function benchMabeNoMagicEnum()
61
    {
62
        $d = DefMarcMabe::byValue(DefMarcMabe::D);
63
        $z = DefMarcMabe::byValue(DefMarcMabe::D);
64
    }
65
66
    public function benchHappyTypesEnum()
67
    {
68
        $a = AbcHappyTypes::A();
69
        $z = AbcHappyTypes::A();
70
    }
71
}
72