Passed
Pull Request — develop (#51)
by Kevin
06:34
created

NextTenYears::getSourceData()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 0
cts 6
cp 0
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 7
nc 1
nop 0
crap 6
1
<?php
2
3
namespace Magium\Configuration\Source\Datetime;
4
5
use Magium\Configuration\Source\SourceInterface;
6
7
class NextTenYears implements SourceInterface
8
{
9
10
    public function getSourceData()
11
    {
12
        $now = date('Y');
13
        $return = [];
14
        do {
15
            $return[] = $now++;
16
        } while (count($return) < 10);
17
        return $return;
18
19
    }
20
21
}
22