NextTenYears::getSourceData()   A
last analyzed

Complexity

Conditions 2
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 11
ccs 0
cts 7
cp 0
rs 9.9
c 0
b 0
f 0
cc 2
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
            $year = $now++;
16
            $return[$year] = $year;
17
        } while (count($return) < 10);
18
        return $return;
19
20
    }
21
22
}
23