Completed
Pull Request — master (#5)
by
unknown
04:09 queued 01:31
created

GermanyBB::prepareHolidays()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 12
ccs 7
cts 7
cp 1
rs 9.4285
cc 2
eloc 7
nc 2
nop 1
crap 2
1
<?php
2
3
/*
4
 * This file is part of the Holiday Library.
5
 *
6
 * (c) Michał Mańko <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE.md
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Michalmanko\Holiday\Provider;
13
14
use ArrayObject;
15
16
/**
17
 * Brandenburg (state of Germany) Holidays Provider.
18
 *
19
 * @author ottowayne <[email protected]>
20
 */
21
class GermanyBB extends Germany
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26 13
    protected function prepareHolidays($year)
27
    {
28
        /** @var ArrayObject $data */
29 13
        $data = new ArrayObject(parent::prepareHolidays($year));
30
31 13
        $data->append($this->getHolidayEasterSunday($year));
32 13
        $data->append($this->getHolidayPentecostSunday($year));
33 13
        if ($year != 2017)
34 13
            $data->append($this->getHolidayReformationDay($year));
35
        
36 13
        return $data;
37
    }
38
}
39