@@ -15,7 +15,7 @@ |
||
15 | 15 | } else if ($this->year >= 2005 && $this->year < 2009) { |
16 | 16 | $this->setupDateTimeObjects($this->generateDateTime($this->year, 6, 29)); |
17 | 17 | } else if ($this->year >= 2009) { |
18 | - $timestamp = strtotime('last saturday', mktime(0, 0, 0, 6, 0, $this->year)); |
|
18 | + $timestamp = strtotime('last saturday', mktime(0, 0, 0, 6, 0, $this->year)); |
|
19 | 19 | $date = new \DateTime(); |
20 | 20 | $date->setTimestamp($timestamp); |
21 | 21 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | $this->description = 'Roze Zaterdag'; |
12 | 12 | |
13 | 13 | if ($this->year >= 1977) { |
14 | - $timestamp = strtotime('fourth saturday', mktime(0, 0, 0, 6, 0, $this->year)); |
|
14 | + $timestamp = strtotime('fourth saturday', mktime(0, 0, 0, 6, 0, $this->year)); |
|
15 | 15 | $date = new \DateTime(); |
16 | 16 | $date->setTimestamp($timestamp); |
17 | 17 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | } else if ($this->year >= 2011) { |
16 | 16 | $this->setupDateTimeObjects($this->generateDateTime($this->year, 5, 28)); |
17 | 17 | } else if ($this->year >= 2009) { |
18 | - $timestamp = strtotime('first saturday', mktime(0, 0, 0, 6, 0, $this->year)); |
|
18 | + $timestamp = strtotime('first saturday', mktime(0, 0, 0, 6, 0, $this->year)); |
|
19 | 19 | $date = new \DateTime(); |
20 | 20 | $date->setTimestamp($timestamp); |
21 | 21 |
@@ -12,11 +12,11 @@ |
||
12 | 12 | |
13 | 13 | if ($this->year >= 2002) { |
14 | 14 | if ($this->year % 4 === 0) { |
15 | - $this->startDate = new \DateTime($this->year . '-09-12'); |
|
16 | - $this->endDate = new \DateTime($this->year . '-09-12'); |
|
15 | + $this->startDate = new \DateTime($this->year.'-09-12'); |
|
16 | + $this->endDate = new \DateTime($this->year.'-09-12'); |
|
17 | 17 | } else { |
18 | - $this->startDate = new \DateTime($this->year . '-09-13'); |
|
19 | - $this->endDate = new \DateTime($this->year . '-09-13'); |
|
18 | + $this->startDate = new \DateTime($this->year.'-09-13'); |
|
19 | + $this->endDate = new \DateTime($this->year.'-09-13'); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | $this->totalLength = 1; |
@@ -10,7 +10,7 @@ |
||
10 | 10 | { |
11 | 11 | $this->description = 'Hoveniersmaandag'; |
12 | 12 | |
13 | - $timestamp = strtotime('third monday', mktime(0, 0, 0, 7, 0, $this->year)); |
|
13 | + $timestamp = strtotime('third monday', mktime(0, 0, 0, 7, 0, $this->year)); |
|
14 | 14 | $date = new \DateTime(); |
15 | 15 | $date->setTimestamp($timestamp); |
16 | 16 |
@@ -92,7 +92,7 @@ |
||
92 | 92 | * @var SpecialDateInterface $item |
93 | 93 | */ |
94 | 94 | foreach ($array as $item) { |
95 | - $key = $item->getStartDate()->format('Y') . '-' . $item->getStartDate()->format('m') . '-' . $item->getStartDate()->format('d') . '.' . $i; |
|
95 | + $key = $item->getStartDate()->format('Y').'-'.$item->getStartDate()->format('m').'-'.$item->getStartDate()->format('d').'.'.$i; |
|
96 | 96 | $i++; |
97 | 97 | $return[$key] = $item; |
98 | 98 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function findSpecialDateByDateTime(\DateTime $date) |
46 | 46 | { |
47 | - $formattedDate = $date->format('Y') . '-' . $date->format('m') . $date->format('d'); |
|
47 | + $formattedDate = $date->format('Y').'-'.$date->format('m').$date->format('d'); |
|
48 | 48 | $items = $this->getAllDates($date->format('Y')); |
49 | 49 | $found = []; |
50 | 50 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * @var $item SpecialDateInterface |
53 | 53 | */ |
54 | 54 | foreach ($items as $key => $item) { |
55 | - $formattedStartDate = $item->getStartDate()->format('Y') . '-' . $item->getStartDate()->format('m') . $item->getStartDate()->format('d'); |
|
55 | + $formattedStartDate = $item->getStartDate()->format('Y').'-'.$item->getStartDate()->format('m').$item->getStartDate()->format('d'); |
|
56 | 56 | |
57 | 57 | if ($formattedDate === $formattedStartDate) { |
58 | 58 | $found[$key] = $item; |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * @var $item SpecialDateInterface |
78 | 78 | */ |
79 | 79 | foreach ($items as $key => $item) { |
80 | - if ((int)$month === (int)$item->getStartDate()->format('m')) { |
|
80 | + if ((int) $month === (int) $item->getStartDate()->format('m')) { |
|
81 | 81 | $found[$key] = $item; |
82 | 82 | } |
83 | 83 | } |
@@ -28,8 +28,8 @@ |
||
28 | 28 | $this->assertEquals($bankHoliday, $specialDate->isBankHoliday()); |
29 | 29 | $this->assertEquals($totalLength, $specialDate->getTotalLength()); |
30 | 30 | |
31 | - $this->assertEquals($startDateString, $startDate->format('Y') . '-' . $startDate->format('m') . '-' . $startDate->format('d')); |
|
32 | - $this->assertEquals($endDateString, $endDate->format('Y') . '-' . $endDate->format('m') . '-' . $endDate->format('d')); |
|
31 | + $this->assertEquals($startDateString, $startDate->format('Y').'-'.$startDate->format('m').'-'.$startDate->format('d')); |
|
32 | + $this->assertEquals($endDateString, $endDate->format('Y').'-'.$endDate->format('m').'-'.$endDate->format('d')); |
|
33 | 33 | |
34 | 34 | if ($isValid) { |
35 | 35 | $this->assertEquals($year, $startDate->format('Y')); |
@@ -67,12 +67,12 @@ discard block |
||
67 | 67 | |
68 | 68 | $this->generate(); |
69 | 69 | |
70 | - if ($this->startDate->format('Y') . '-' . $this->startDate->format('m') . '-' . $this->startDate->format('d') === '0001-01-01') { |
|
70 | + if ($this->startDate->format('Y').'-'.$this->startDate->format('m').'-'.$this->startDate->format('d') === '0001-01-01') { |
|
71 | 71 | $this->valid = false; |
72 | 72 | $this->totalLength = 0; |
73 | 73 | } |
74 | 74 | |
75 | - if ($this->endDate->format('Y') . '-' . $this->endDate->format('m') . '-' . $this->endDate->format('d') === '0001-01-01') { |
|
75 | + if ($this->endDate->format('Y').'-'.$this->endDate->format('m').'-'.$this->endDate->format('d') === '0001-01-01') { |
|
76 | 76 | $this->valid = false; |
77 | 77 | $this->totalLength = 0; |
78 | 78 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | */ |
102 | 102 | protected function generateDateTime($year, $month, $day) |
103 | 103 | { |
104 | - $date = \DateTime::createFromFormat('Y-m-d', $year . '-' . $month . '-' . $day); |
|
104 | + $date = \DateTime::createFromFormat('Y-m-d', $year.'-'.$month.'-'.$day); |
|
105 | 105 | |
106 | 106 | if ($date === false) { |
107 | 107 | return $this->zeroDate; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | $interval = $this->startDate->diff($this->endDate); |
124 | 124 | |
125 | - $this->totalLength = (int)$interval->format('%R%a') + 1; |
|
125 | + $this->totalLength = (int) $interval->format('%R%a') + 1; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | /** |