BasRhin   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 25
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 7 1
1
<?php declare(strict_types=1);
2
/**
3
 * This file is part of the Yasumi package.
4
 *
5
 * Copyright (c) 2015 - 2020 AzuyaLabs
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @author Sacha Telgenhof <[email protected]>
11
 */
12
13
namespace Yasumi\Provider\France;
14
15
use Yasumi\Exception\InvalidDateException;
16
use Yasumi\Exception\UnknownLocaleException;
17
use Yasumi\Provider\ChristianHolidays;
18
use Yasumi\Provider\France;
19
20
/**
21
 * Provider for all holidays in Bas-Rhin (France).
22
 *
23
 * Bas-Rhin is a department in the Alsace-Champagne-Ardenne-Lorraine region of France. The name means "Lower Rhine".
24
 * It is the more populous and densely populated of the two departments of the traditional Alsace region, with 1,109,460
25
 * inhabitants in 2013. The prefecture and the General Council are based in Strasbourg.
26
 *
27
 * @link https://en.wikipedia.org/wiki/Bas-Rhin
28
 */
29
class BasRhin extends France
30
{
31
    use ChristianHolidays;
32
33
    /**
34
     * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective
35
     * country or sub-region.
36
     */
37
    public const ID = 'FR-67';
38
39
    /**
40
     * Initialize holidays for Bas-Rhin (France).
41
     *
42
     * @throws InvalidDateException
43
     * @throws \InvalidArgumentException
44
     * @throws UnknownLocaleException
45
     * @throws \Exception
46
     */
47
    public function initialize(): void
48
    {
49
        parent::initialize();
50
51
        // Add custom Christian holidays
52
        $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale));
53
        $this->addHoliday($this->stStephensDay($this->year, $this->timezone, $this->locale));
54
    }
55
}
56