Passed
Push — master ( 62401f...daf94f )
by Alec
07:24
created

EventsBasicDataProviderTwo   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 3
1
<?php
2
/**
3
 * User: alec
4
 * Date: 04.11.18
5
 * Time: 13:05
6
 */
7
8
namespace Unit\DataProviders;
9
10
11
class EventsBasicDataProviderTwo
12
{
13
    protected static $timestamp = 1514764800;
14
    protected static $step = 1;
15
    protected static $lines = 140;
16
17
    public static function data(): ?\Generator
18
    {
19
        $number = 1;
20
        while (static::$lines-- > 0) {
21
            yield static::$timestamp;
22
            if ($number % 2 === 0) {
23
                static::$timestamp += static::$step;
24
            }
25
            $number++;
26
        }
27
    }
28
}