Skip to content

Commit 2276cb3

Browse files
committed
Fixed failing CI
Signed-off-by: Mua N. Laurent <[email protected]>
1 parent 78b910f commit 2276cb3

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/DataTypes/Calendar.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace SimpleSoftwareIO\QrCode\DataTypes;
44

5-
use DateTime;
65
use BaconQrCode\Exception\InvalidArgumentException;
6+
use DateTime;
77
use DateTimeZone;
88
use Exception;
99

@@ -233,7 +233,6 @@ protected function setUrl($url)
233233
*
234234
* @param string $eventDateTime
235235
* @param string $type
236-
*
237236
*/
238237
protected function setEventDateTime($eventDateTime, $type = '')
239238
{
@@ -290,12 +289,10 @@ protected function isValidDateTime($dateTime, $type = '')
290289
return true;
291290
}
292291

293-
294292
/**
295293
* Returns correct date time to string.
296294
*
297295
* @param string $dateTime
298-
*
299296
* @return string
300297
*/
301298
protected function convertEventDateTimeToString($dateTime)
@@ -305,6 +302,7 @@ protected function convertEventDateTimeToString($dateTime)
305302
} catch (Exception $e) {
306303
throw new InvalidArgumentException('Invalid date provided');
307304
}
305+
308306
return $date->format('yymd\THms');
309307
}
310308

@@ -320,6 +318,7 @@ protected function isValidTimeZone($timezone)
320318
if (! in_array($timezone, DateTimeZone::listIdentifiers())) {
321319
throw new InvalidArgumentException('Invalid timezone provided.');
322320
}
321+
323322
return true;
324323
}
325324

@@ -351,8 +350,9 @@ protected function setAlarm($alarm)
351350
'SUMMARY:'.$alarm['summary'].$this->separator : '';
352351
$alarmString .= $this->keyExists('description', $alarm) ?
353352
'DESCRIPTION:'.$alarm['description'].$this->separator : '';
354-
if($this->keyExists('trigger', $alarm) && is_array($alarm['trigger']))
353+
if ($this->keyExists('trigger', $alarm) && is_array($alarm['trigger'])) {
355354
$alarmString .= $this->setAlarmTrigger($alarm['trigger']).$this->separator;
355+
}
356356
$alarmString .= 'END:VALARM'.$this->separator;
357357
$this->alarm = $alarmString;
358358
} else {

tests/DataTypes/CalendarTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?php
22

3-
43
namespace DataTypes;
54

6-
75
use BaconQrCode\Exception\InvalidArgumentException;
86
use PHPUnit\Framework\TestCase;
97
use SimpleSoftwareIO\QrCode\DataTypes\Calendar;
@@ -55,7 +53,6 @@ public function test_start_date_time_is_mandatory()
5553
}
5654

5755
$this->assertTrue($exceptionOccurred);
58-
5956
}
6057

6158
public function test_it_generates_a_proper_format_with_just_the_summary_and_start_date_time()
@@ -190,7 +187,7 @@ public function test_it_generates_a_proper_format_with_calendar_parameters()
190187
'repeat' => 2,
191188
'summary' => 'Alarm Summary',
192189
'description' => 'Alarm Description can be longer',
193-
]
190+
],
194191
],
195192
]);
196193

0 commit comments

Comments
 (0)