2
2
3
3
namespace SimpleSoftwareIO \QrCode \DataTypes ;
4
4
5
- use DateTime ;
6
5
use BaconQrCode \Exception \InvalidArgumentException ;
6
+ use DateTime ;
7
7
use DateTimeZone ;
8
8
use Exception ;
9
9
@@ -233,7 +233,6 @@ protected function setUrl($url)
233
233
*
234
234
* @param string $eventDateTime
235
235
* @param string $type
236
- *
237
236
*/
238
237
protected function setEventDateTime ($ eventDateTime , $ type = '' )
239
238
{
@@ -290,12 +289,10 @@ protected function isValidDateTime($dateTime, $type = '')
290
289
return true ;
291
290
}
292
291
293
-
294
292
/**
295
293
* Returns correct date time to string.
296
294
*
297
295
* @param string $dateTime
298
- *
299
296
* @return string
300
297
*/
301
298
protected function convertEventDateTimeToString ($ dateTime )
@@ -305,6 +302,7 @@ protected function convertEventDateTimeToString($dateTime)
305
302
} catch (Exception $ e ) {
306
303
throw new InvalidArgumentException ('Invalid date provided ' );
307
304
}
305
+
308
306
return $ date ->format ('yymd\THms ' );
309
307
}
310
308
@@ -320,6 +318,7 @@ protected function isValidTimeZone($timezone)
320
318
if (! in_array ($ timezone , DateTimeZone::listIdentifiers ())) {
321
319
throw new InvalidArgumentException ('Invalid timezone provided. ' );
322
320
}
321
+
323
322
return true ;
324
323
}
325
324
@@ -351,8 +350,9 @@ protected function setAlarm($alarm)
351
350
'SUMMARY: ' .$ alarm ['summary ' ].$ this ->separator : '' ;
352
351
$ alarmString .= $ this ->keyExists ('description ' , $ alarm ) ?
353
352
'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 ' ])) {
355
354
$ alarmString .= $ this ->setAlarmTrigger ($ alarm ['trigger ' ]).$ this ->separator ;
355
+ }
356
356
$ alarmString .= 'END:VALARM ' .$ this ->separator ;
357
357
$ this ->alarm = $ alarmString ;
358
358
} else {
0 commit comments