Passed
Push — 7.x ( 1e3f37...c475d0 )
by Adrien
06:13 queued 35s
created

SplEnumBench   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 36
rs 10
wmc 3
1
<?php
2
3
/**
4
 * Part of SplTypes package.
5
 *
6
 * (c) Adrien Loyant <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Ducks\Component\SplTypes\Tests\benchmark;
15
16
use Ducks\Component\SplTypes\Tests\common\Month;
17
18
class SplEnumBench
19
{
20
    /**
21
     * @Revs(1000)
22
     *
23
     * @Iterations(5)
24
     *
25
     * @return void
26
     */
27
    public function benchCreateMonth(): void
28
    {
29
        new Month();
30
    }
31
32
    /**
33
     * @Revs(1000)
34
     *
35
     * @Iterations(5)
36
     *
37
     * @return void
38
     */
39
    public function benchCreateSeptemberMonth(): void
40
    {
41
        new Month(Month::SEPTEMBER);
42
    }
43
44
    /**
45
     * @Revs(1000)
46
     *
47
     * @Iterations(5)
48
     *
49
     * @return void
50
     */
51
    public function benchCreateUnstrictMonth(): void
52
    {
53
        new Month('1', false);
54
    }
55
}
56