Tyrol::initialize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 0
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\Austria;
14
15
use Yasumi\Exception\InvalidDateException;
16
use Yasumi\Exception\UnknownLocaleException;
17
use Yasumi\Provider\Austria;
18
19
/**
20
 * Provider for all holidays in Tyrol (Austria).
21
 *
22
 * @link https://en.wikipedia.org/wiki/Tyrol_(state)
23
 */
24
class Tyrol extends Austria
25
{
26
    /**
27
     * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective
28
     * country or sub-region.
29
     */
30
    public const ID = 'AT-7';
31
32
    /**
33
     * Initialize holidays for Tyrol (Austria).
34
     *
35
     * @throws InvalidDateException
36
     * @throws \InvalidArgumentException
37
     * @throws UnknownLocaleException
38
     * @throws \Exception
39
     */
40
    public function initialize(): void
41
    {
42
        parent::initialize();
43
44
        // Add custom Common holidays.
45
        $this->addHoliday($this->stJosephsDay($this->year, $this->timezone, $this->locale));
46
    }
47
}
48