Completed
Branch master (19a7d3)
by Tim
05:43
created
Resources/Private/Php/ics-parser/example.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -37,18 +37,18 @@
 block discarded – undo
37 37
 echo "<hr/><hr/>";
38 38
 
39 39
 foreach ($events as $event) {
40
-    echo "SUMMARY: ".$event['SUMMARY']."<br/>";
41
-    echo "DTSTART: ".$event['DTSTART']." - UNIX-Time: ".$ical->iCalDateToUnixTimestamp($event['DTSTART'])."<br/>";
42
-    echo "DTEND: ".$event['DTEND']."<br/>";
43
-    echo "DTSTAMP: ".$event['DTSTAMP']."<br/>";
44
-    echo "UID: ".$event['UID']."<br/>";
45
-    echo "CREATED: ".$event['CREATED']."<br/>";
46
-    echo "DESCRIPTION: ".$event['DESCRIPTION']."<br/>";
47
-    echo "LAST-MODIFIED: ".$event['LAST-MODIFIED']."<br/>";
48
-    echo "LOCATION: ".$event['LOCATION']."<br/>";
49
-    echo "SEQUENCE: ".$event['SEQUENCE']."<br/>";
50
-    echo "STATUS: ".$event['STATUS']."<br/>";
51
-    echo "TRANSP: ".$event['TRANSP']."<br/>";
40
+    echo "SUMMARY: " . $event['SUMMARY'] . "<br/>";
41
+    echo "DTSTART: " . $event['DTSTART'] . " - UNIX-Time: " . $ical->iCalDateToUnixTimestamp($event['DTSTART']) . "<br/>";
42
+    echo "DTEND: " . $event['DTEND'] . "<br/>";
43
+    echo "DTSTAMP: " . $event['DTSTAMP'] . "<br/>";
44
+    echo "UID: " . $event['UID'] . "<br/>";
45
+    echo "CREATED: " . $event['CREATED'] . "<br/>";
46
+    echo "DESCRIPTION: " . $event['DESCRIPTION'] . "<br/>";
47
+    echo "LAST-MODIFIED: " . $event['LAST-MODIFIED'] . "<br/>";
48
+    echo "LOCATION: " . $event['LOCATION'] . "<br/>";
49
+    echo "SEQUENCE: " . $event['SEQUENCE'] . "<br/>";
50
+    echo "STATUS: " . $event['STATUS'] . "<br/>";
51
+    echo "TRANSP: " . $event['TRANSP'] . "<br/>";
52 52
     echo "<hr/>";
53 53
 }
54 54
 ?>
Please login to merge, or discard this patch.
Resources/Private/Php/ics-parser/class.iCalReader.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -134,11 +134,11 @@  discard block
 block discarded – undo
134 134
             switch ($component) {
135 135
             case 'VEVENT': 
136 136
                 $value = $this->cal[$component][$this->event_count - 1]
137
-                                               [$keyword].$value;
137
+                                               [$keyword] . $value;
138 138
                 break;
139 139
             case 'VTODO' : 
140 140
                 $value = $this->cal[$component][$this->todo_count - 1]
141
-                                               [$keyword].$value;
141
+                                               [$keyword] . $value;
142 142
                 break;
143 143
             }
144 144
         }
@@ -193,11 +193,11 @@  discard block
 block discarded – undo
193 193
         $icalDate = str_replace('T', '', $icalDate); 
194 194
         $icalDate = str_replace('Z', '', $icalDate); 
195 195
 
196
-        $pattern  = '/([0-9]{4})';   // 1: YYYY
197
-        $pattern .= '([0-9]{2})';    // 2: MM
198
-        $pattern .= '([0-9]{2})';    // 3: DD
199
-        $pattern .= '([0-9]{0,2})';  // 4: HH
200
-        $pattern .= '([0-9]{0,2})';  // 5: MM
196
+        $pattern  = '/([0-9]{4})'; // 1: YYYY
197
+        $pattern .= '([0-9]{2})'; // 2: MM
198
+        $pattern .= '([0-9]{2})'; // 3: DD
199
+        $pattern .= '([0-9]{0,2})'; // 4: HH
200
+        $pattern .= '([0-9]{0,2})'; // 5: MM
201 201
         $pattern .= '([0-9]{0,2})/'; // 6: SS
202 202
         preg_match($pattern, $icalDate, $date); 
203 203
 
@@ -230,9 +230,9 @@  discard block
 block discarded – undo
230 230
           if (isset($anEvent['RRULE']) && $anEvent['RRULE'] != '') {
231 231
             // Recurring event, parse RRULE and add appropriate duplicate events
232 232
             $rrules = array();
233
-            $rrule_strings = explode(';',$anEvent['RRULE']);
233
+            $rrule_strings = explode(';', $anEvent['RRULE']);
234 234
             foreach ($rrule_strings as $s) {
235
-              list($k,$v) = explode('=', $s);
235
+              list($k, $v) = explode('=', $s);
236 236
               $rrules[$k] = $v;
237 237
             }
238 238
             // Get Start timestamp
@@ -251,21 +251,21 @@  discard block
 block discarded – undo
251 251
                 $recurring_timestamp = strtotime($offset, $start_timestamp);
252 252
                 while ($recurring_timestamp <= $until) {
253 253
                   // Add event
254
-                  $anEvent['DTSTART'] = date('Ymd\THis',$recurring_timestamp);
255
-                  $anEvent['DTEND'] = date('Ymd\THis',$recurring_timestamp+$event_timestmap_offset);
254
+                  $anEvent['DTSTART'] = date('Ymd\THis', $recurring_timestamp);
255
+                  $anEvent['DTEND'] = date('Ymd\THis', $recurring_timestamp + $event_timestmap_offset);
256 256
                   $events[] = $anEvent;
257 257
                   // Move forward
258
-                  $recurring_timestamp = strtotime($offset,$recurring_timestamp);
258
+                  $recurring_timestamp = strtotime($offset, $recurring_timestamp);
259 259
                 }
260 260
                 break;
261 261
               case 'WEEKLY':
262 262
                 // Create offset
263 263
                 $offset = "+$interval week";
264 264
                 // Build list of days of week to add events
265
-                $weekdays = array('SU','MO','TU','WE','TH','FR','SA');
266
-                $bydays = (isset($rrules['BYDAY']) && $rrules['BYDAY'] != '') ? explode(',', $rrules['BYDAY']) : array('SU','MO','TU','WE','TH','FR','SA');
265
+                $weekdays = array('SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA');
266
+                $bydays = (isset($rrules['BYDAY']) && $rrules['BYDAY'] != '') ? explode(',', $rrules['BYDAY']) : array('SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA');
267 267
                 // Get timestamp of first day of start week
268
-                $week_recurring_timestamp = (date('w', $start_timestamp) == 0) ? $start_timestamp : strtotime('last Sunday '.date('H:i:s',$start_timestamp), $start_timestamp);
268
+                $week_recurring_timestamp = (date('w', $start_timestamp) == 0) ? $start_timestamp : strtotime('last Sunday ' . date('H:i:s', $start_timestamp), $start_timestamp);
269 269
                 // Step through weeks
270 270
                 while ($week_recurring_timestamp <= $until) {
271 271
                   // Add events for bydays
@@ -274,15 +274,15 @@  discard block
 block discarded – undo
274 274
                     // Check if day should be added
275 275
                     if (in_array($day, $bydays) && $day_recurring_timestamp > $start_timestamp && $day_recurring_timestamp <= $until) {
276 276
                       // Add event to day
277
-                      $anEvent['DTSTART'] = date('Ymd\THis',$day_recurring_timestamp);
278
-                      $anEvent['DTEND'] = date('Ymd\THis',$day_recurring_timestamp+$event_timestmap_offset);
277
+                      $anEvent['DTSTART'] = date('Ymd\THis', $day_recurring_timestamp);
278
+                      $anEvent['DTEND'] = date('Ymd\THis', $day_recurring_timestamp + $event_timestmap_offset);
279 279
                       $events[] = $anEvent;
280 280
                     }
281 281
                     // Move forward a day
282
-                    $day_recurring_timestamp = strtotime('+1 day',$day_recurring_timestamp);
282
+                    $day_recurring_timestamp = strtotime('+1 day', $day_recurring_timestamp);
283 283
                   }
284 284
                   // Move forward $interaval weeks
285
-                  $week_recurring_timestamp = strtotime($offset,$week_recurring_timestamp);
285
+                  $week_recurring_timestamp = strtotime($offset, $week_recurring_timestamp);
286 286
                 }
287 287
                 break;
288 288
               case 'MONTHLY':
@@ -293,29 +293,29 @@  discard block
 block discarded – undo
293 293
                   // Deal with BYMONTHDAY
294 294
                   while ($recurring_timestamp <= $until) {
295 295
                     // Add event
296
-                    $anEvent['DTSTART'] = date('Ym'.sprintf('%02d',$rrules['BYMONTHDAY']).'\THis',$recurring_timestamp);
297
-                    $anEvent['DTEND'] = date('Ymd\THis',$this->iCalDateToUnixTimestamp($anEvent['DTSTART'])+$event_timestmap_offset);
296
+                    $anEvent['DTSTART'] = date('Ym' . sprintf('%02d', $rrules['BYMONTHDAY']) . '\THis', $recurring_timestamp);
297
+                    $anEvent['DTEND'] = date('Ymd\THis', $this->iCalDateToUnixTimestamp($anEvent['DTSTART']) + $event_timestmap_offset);
298 298
                     $events[] = $anEvent;
299 299
                     // Move forward
300
-                    $recurring_timestamp = strtotime($offset,$recurring_timestamp);
300
+                    $recurring_timestamp = strtotime($offset, $recurring_timestamp);
301 301
                   }
302 302
                 } elseif (isset($rrules['BYDAY']) && $rrules['BYDAY'] != '') {
303
-                  $start_time = date('His',$start_timestamp);
303
+                  $start_time = date('His', $start_timestamp);
304 304
                   // Deal with BYDAY
305 305
                   $day_number = substr($rrules['BYDAY'], 0, 1);
306 306
                   $week_day = substr($rrules['BYDAY'], 1);
307 307
                   $day_cardinals = array(1 => 'first', 2 => 'second', 3 => 'third', 4 => 'fourth', 5 => 'fifth');
308
-                  $weekdays = array('SU' => 'sunday','MO' => 'monday','TU' => 'tuesday','WE' => 'wednesday','TH' => 'thursday','FR' => 'friday','SA' => 'saturday');
308
+                  $weekdays = array('SU' => 'sunday', 'MO' => 'monday', 'TU' => 'tuesday', 'WE' => 'wednesday', 'TH' => 'thursday', 'FR' => 'friday', 'SA' => 'saturday');
309 309
                   while ($recurring_timestamp <= $until) {
310
-                    $event_start_desc = "{$day_cardinals[$day_number]} {$weekdays[$week_day]} of ".date('F',$recurring_timestamp)." ".date('Y',$recurring_timestamp)." ".date('H:i:s',$recurring_timestamp);
310
+                    $event_start_desc = "{$day_cardinals[$day_number]} {$weekdays[$week_day]} of " . date('F', $recurring_timestamp) . " " . date('Y', $recurring_timestamp) . " " . date('H:i:s', $recurring_timestamp);
311 311
                     $event_start_timestamp = strtotime($event_start_desc);
312 312
                     if ($event_start_timestamp > $start_timestamp && $event_start_timestamp < $until) {
313
-                      $anEvent['DTSTART'] = date('Ymd\T',$event_start_timestamp).$start_time;
314
-                      $anEvent['DTEND'] = date('Ymd\THis',$this->iCalDateToUnixTimestamp($anEvent['DTSTART'])+$event_timestmap_offset);
313
+                      $anEvent['DTSTART'] = date('Ymd\T', $event_start_timestamp) . $start_time;
314
+                      $anEvent['DTEND'] = date('Ymd\THis', $this->iCalDateToUnixTimestamp($anEvent['DTSTART']) + $event_timestmap_offset);
315 315
                       $events[] = $anEvent;
316 316
                     }
317 317
                     // Move forward
318
-                    $recurring_timestamp = strtotime($offset,$recurring_timestamp);
318
+                    $recurring_timestamp = strtotime($offset, $recurring_timestamp);
319 319
                   }
320 320
                 }
321 321
                 break;
@@ -325,39 +325,39 @@  discard block
 block discarded – undo
325 325
                 $recurring_timestamp = strtotime($offset, $start_timestamp);
326 326
                 $month_names = array(1=>"January", 2=>"Februrary", 3=>"March", 4=>"April", 5=>"May", 6=>"June", 7=>"July", 8=>"August", 9=>"September", 10=>"October", 11=>"November", 12=>"December");
327 327
                 // HACK: Exchange doesn't set a correct UNTIL for yearly events, so just go 2 years out
328
-                $until = strtotime('+2 year',$start_timestamp);
328
+                $until = strtotime('+2 year', $start_timestamp);
329 329
                 // Check if BYDAY rule exists
330 330
                 if (isset($rrules['BYDAY']) && $rrules['BYDAY'] != '') {
331
-                  $start_time = date('His',$start_timestamp);
331
+                  $start_time = date('His', $start_timestamp);
332 332
                   // Deal with BYDAY
333 333
                   $day_number = substr($rrules['BYDAY'], 0, 1);
334 334
                   $month_day = substr($rrules['BYDAY'], 1);
335 335
                   $day_cardinals = array(1 => 'first', 2 => 'second', 3 => 'third', 4 => 'fourth', 5 => 'fifth');
336
-                  $weekdays = array('SU' => 'sunday','MO' => 'monday','TU' => 'tuesday','WE' => 'wednesday','TH' => 'thursday','FR' => 'friday','SA' => 'saturday');
336
+                  $weekdays = array('SU' => 'sunday', 'MO' => 'monday', 'TU' => 'tuesday', 'WE' => 'wednesday', 'TH' => 'thursday', 'FR' => 'friday', 'SA' => 'saturday');
337 337
                   while ($recurring_timestamp <= $until) {
338
-                    $event_start_desc = "{$day_cardinals[$day_number]} {$weekdays[$month_day]} of {$month_names[$rrules['BYMONTH']]} ".date('Y',$recurring_timestamp)." ".date('H:i:s',$recurring_timestamp);
338
+                    $event_start_desc = "{$day_cardinals[$day_number]} {$weekdays[$month_day]} of {$month_names[$rrules['BYMONTH']]} " . date('Y', $recurring_timestamp) . " " . date('H:i:s', $recurring_timestamp);
339 339
                     $event_start_timestamp = strtotime($event_start_desc);
340 340
                     if ($event_start_timestamp > $start_timestamp && $event_start_timestamp < $until) {
341
-                      $anEvent['DTSTART'] = date('Ymd\T',$event_start_timestamp).$start_time;
342
-                      $anEvent['DTEND'] = date('Ymd\THis',$this->iCalDateToUnixTimestamp($anEvent['DTSTART'])+$event_timestmap_offset);
341
+                      $anEvent['DTSTART'] = date('Ymd\T', $event_start_timestamp) . $start_time;
342
+                      $anEvent['DTEND'] = date('Ymd\THis', $this->iCalDateToUnixTimestamp($anEvent['DTSTART']) + $event_timestmap_offset);
343 343
                       $events[] = $anEvent;
344 344
                     }
345 345
                     // Move forward
346
-                    $recurring_timestamp = strtotime($offset,$recurring_timestamp);
346
+                    $recurring_timestamp = strtotime($offset, $recurring_timestamp);
347 347
                   }
348 348
                 } else {
349
-                  $day = date('d',$start_timestamp);
349
+                  $day = date('d', $start_timestamp);
350 350
                   // Step throuhg years adding specific month dates
351 351
                   while ($recurring_timestamp <= $until) {
352
-                    $event_start_desc = "$day {$month_names[$rrules['BYMONTH']]} ".date('Y',$recurring_timestamp)." ".date('H:i:s',$recurring_timestamp);
352
+                    $event_start_desc = "$day {$month_names[$rrules['BYMONTH']]} " . date('Y', $recurring_timestamp) . " " . date('H:i:s', $recurring_timestamp);
353 353
                     $event_start_timestamp = strtotime($event_start_desc);
354 354
                     if ($event_start_timestamp > $start_timestamp && $event_start_timestamp < $until) {
355
-                      $anEvent['DTSTART'] = date('Ymd\T',$event_start_timestamp).$start_time;
356
-                      $anEvent['DTEND'] = date('Ymd\THis',$this->iCalDateToUnixTimestamp($anEvent['DTSTART'])+$event_timestmap_offset);
355
+                      $anEvent['DTSTART'] = date('Ymd\T', $event_start_timestamp) . $start_time;
356
+                      $anEvent['DTEND'] = date('Ymd\THis', $this->iCalDateToUnixTimestamp($anEvent['DTSTART']) + $event_timestmap_offset);
357 357
                       $events[] = $anEvent;
358 358
                     }
359 359
                     // Move forward
360
-                    $recurring_timestamp = strtotime($offset,$recurring_timestamp);
360
+                    $recurring_timestamp = strtotime($offset, $recurring_timestamp);
361 361
                   }
362 362
                 }
363 363
                 break;
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
      */
387 387
     public function hasEvents() 
388 388
     {
389
-        return ( count($this->events()) > 0 ? true : false );
389
+        return (count($this->events()) > 0 ? true : false);
390 390
     }
391 391
 
392 392
     /**
Please login to merge, or discard this patch.
Private/Php/ICalDissect/src/JMBTechnologyLimited/ICalDissect/ICalParser.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
     
45 45
 			# pass1: put multi lines back into one line.
46 46
 			$linesCompacted = array();
47
-			foreach($lines as $line) {
48
-				if (substr($line,0,1) == ' ') {
49
-					$linesCompacted[count($linesCompacted)-1] .= substr($line, 1);
47
+			foreach ($lines as $line) {
48
+				if (substr($line, 0, 1) == ' ') {
49
+					$linesCompacted[count($linesCompacted) - 1] .= substr($line, 1);
50 50
 				} else {
51 51
 					$linesCompacted[] = trim($line);
52 52
 				}
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 						
55 55
 			#pass2: turn lines into formatted data
56 56
 			$rawLines = array();
57
-			foreach($linesCompacted as $line) {
57
+			foreach ($linesCompacted as $line) {
58 58
 				$bits = explode(":", $line, 2);
59 59
 				$kbits = explode(";", $bits[0], 2);
60 60
 				$value = count($bits) == 2 ? $bits[1] : '';
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 			
74 74
 			# pass3: finally parse lines
75 75
 			$stack = array();
76
-			foreach($rawLines as $line) {
76
+			foreach ($rawLines as $line) {
77 77
 				if ($line['KEYWORD'] == 'BEGIN') {
78 78
 					$stack[] = $line['VALUE'];
79 79
 					if ($line['VALUE'] == 'VEVENT') {
@@ -83,12 +83,12 @@  discard block
 block discarded – undo
83 83
 					// TODO check VALUE and last stack match
84 84
 					array_pop($stack);
85 85
 				} else {
86
-					$currentlyIn = $stack[count($stack)-1];
86
+					$currentlyIn = $stack[count($stack) - 1];
87 87
 					//print $currentlyIn." with K ".$line['KEYWORD']."\n";
88 88
 					if ($currentlyIn == 'VEVENT') {
89
-						$this->events[count($this->events)-1]->processLine($line['KEYWORD'],$line['VALUE'], $line['KEYWORDOPTIONS']);
89
+						$this->events[count($this->events) - 1]->processLine($line['KEYWORD'], $line['VALUE'], $line['KEYWORDOPTIONS']);
90 90
 					} elseif ($currentlyIn == 'VTIMEZONE') {
91
-						$this->timezone->processLine($line['KEYWORD'],$line['VALUE'], $line['KEYWORDOPTIONS']);
91
+						$this->timezone->processLine($line['KEYWORD'], $line['VALUE'], $line['KEYWORDOPTIONS']);
92 92
 					}
93 93
 				}
94 94
 			}
Please login to merge, or discard this patch.
Private/Php/ICalDissect/src/JMBTechnologyLimited/ICalDissect/ICalEvent.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	protected $exdates = array();
39 39
 
40 40
 	public function __construct(\DateTimeZone $timeZone = null) {
41
-		$this->timeZoneUTC =  new \DateTimeZone('UTC');
41
+		$this->timeZoneUTC = new \DateTimeZone('UTC');
42 42
 		$this->timeZone = $timeZone ? $timeZone : $this->timeZoneUTC;
43 43
 	} 
44 44
 	
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
 			$this->deleted = true;
64 64
 		} else if ($keyword == 'RRULE') {
65 65
 			$rrule = array();
66
-			foreach(explode(";", $value) as $rruleBit) {
67
-				list($k, $v) = explode("=",$rruleBit,2);
66
+			foreach (explode(";", $value) as $rruleBit) {
67
+				list($k, $v) = explode("=", $rruleBit, 2);
68 68
 				$rrule[strtoupper($k)] = $v;
69 69
 			}
70 70
 			$this->ical_rrule = $rrule;
@@ -83,15 +83,15 @@  discard block
 block discarded – undo
83 83
 	**/
84 84
 	protected function parseDateTime($value, $isStart) {
85 85
         $value = str_replace('Z', '', $value);
86
-		$pattern  = '/([0-9]{4})';   // 1: YYYY
87
-        $pattern .= '([0-9]{2})';    // 2: MM
88
-        $pattern .= '([0-9]{2})';    // 3: DD
86
+		$pattern = '/([0-9]{4})'; // 1: YYYY
87
+        $pattern .= '([0-9]{2})'; // 2: MM
88
+        $pattern .= '([0-9]{2})'; // 3: DD
89 89
         
90 90
 		$hasTimePart = false;
91 91
 		if (strpos($value, "T") > 1) {
92 92
 			$value = str_replace('T', '', $value);
93
-			$pattern .= '([0-9]{0,2})';  // 4: HH
94
-			$pattern .= '([0-9]{0,2})';  // 5: MM
93
+			$pattern .= '([0-9]{0,2})'; // 4: HH
94
+			$pattern .= '([0-9]{0,2})'; // 5: MM
95 95
 			$pattern .= '([0-9]{0,2})/'; // 6: SS
96 96
 			$hasTimePart = true;
97 97
 		} else {
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
 		if ($hasTimePart) {
112 112
 			$out->setTime((int)$date[4], (int)$date[5], (int)$date[6]);
113 113
 		} else if ($isStart) {
114
-			$out->setTime(0,0,0);
114
+			$out->setTime(0, 0, 0);
115 115
 		} else if (!$isStart) {
116
-			$out->setTime(23,59,59);
116
+			$out->setTime(23, 59, 59);
117 117
 		}
118 118
 		if ($this->timeZone->getName() != 'UTC') {
119 119
 			$out->setTimezone($this->timeZoneUTC);
Please login to merge, or discard this patch.
Private/Php/ICalDissect/tests/JMBTechnologyLimited/ICalDissect/LineTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,18 +15,18 @@
 block discarded – undo
15 15
 
16 16
 	function dataForTestMultiLineDescription() {
17 17
 		return array(
18
-				array('IcalParserBasicImportMultiLineDescription.ical','Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Lizard'),
19
-				array('IcalParserBasicImportMultiLineDescription2.ical','Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Lizard:Blue'),
20
-				array('IcalParserBasicImportMultiLineDescription3.ical','Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Go Miaow Lizard:Blue abcdefgtijklmnopqrstuvwxyz abcdefgtijklmnopqrstuvwxyz 12345'),
18
+				array('IcalParserBasicImportMultiLineDescription.ical', 'Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Lizard'),
19
+				array('IcalParserBasicImportMultiLineDescription2.ical', 'Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Lizard:Blue'),
20
+				array('IcalParserBasicImportMultiLineDescription3.ical', 'Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Go Miaow Lizard:Blue abcdefgtijklmnopqrstuvwxyz abcdefgtijklmnopqrstuvwxyz 12345'),
21 21
 			);
22 22
 	}
23 23
 
24 24
 	/**
25 25
      * @dataProvider dataForTestMultiLineDescription
26 26
      */		
27
-	function testMultiLineDescription ($filename, $output) {
27
+	function testMultiLineDescription($filename, $output) {
28 28
 		$parser = new ICalParser();
29
-		$this->assertTrue($parser->parseFromFile(dirname(__FILE__)."/data/".$filename));
29
+		$this->assertTrue($parser->parseFromFile(dirname(__FILE__) . "/data/" . $filename));
30 30
 		$events = $parser->getEvents();
31 31
 		$this->assertEquals(1, count($events));
32 32
 		$event = $events[0];
Please login to merge, or discard this patch.
Php/ICalDissect/tests/JMBTechnologyLimited/ICalDissect/RRuleTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,24 +16,24 @@  discard block
 block discarded – undo
16 16
 
17 17
 	function dataForTestRRule() {
18 18
 		return array(
19
-			array('IcalParserRRule1.ics',array("FREQ"=>"WEEKLY","BYDAY"=>"WE")),
20
-			array('IcalParserRRule2.ics',array("FREQ"=>"WEEKLY","BYDAY"=>"TH","COUNT"=>5)),
19
+			array('IcalParserRRule1.ics', array("FREQ"=>"WEEKLY", "BYDAY"=>"WE")),
20
+			array('IcalParserRRule2.ics', array("FREQ"=>"WEEKLY", "BYDAY"=>"TH", "COUNT"=>5)),
21 21
 		);
22 22
 	}
23 23
 
24 24
 	/**
25 25
 	 * @dataProvider dataForTestRRule
26 26
 	 */
27
-	function testGetByPosition ($filename, $rrule) {
27
+	function testGetByPosition($filename, $rrule) {
28 28
 		$parser = new ICalParser();
29
-		$this->assertTrue($parser->parseFromFile(dirname(__FILE__)."/data/".$filename));
29
+		$this->assertTrue($parser->parseFromFile(dirname(__FILE__) . "/data/" . $filename));
30 30
 		$events = $parser->getEvents();
31 31
 		$this->assertEquals(1, count($events));
32 32
 		$event = $events[0];
33 33
 
34 34
 		$eventRRule = $event->getRrule();
35 35
 		$this->assertEquals(count(array_keys($rrule)), count(array_keys($eventRRule)));
36
-		foreach($rrule as $k=>$v) {
36
+		foreach ($rrule as $k=>$v) {
37 37
 			$this->assertEquals($v, $eventRRule[$k]);
38 38
 		}
39 39
 	}
@@ -41,16 +41,16 @@  discard block
 block discarded – undo
41 41
 	/**
42 42
 	 * @dataProvider dataForTestRRule
43 43
 	 */
44
-	function testGetByArray ($filename, $rrule) {
44
+	function testGetByArray($filename, $rrule) {
45 45
 		$parser = new ICalParser();
46
-		$this->assertTrue($parser->parseFromFile(dirname(__FILE__)."/data/".$filename));
46
+		$this->assertTrue($parser->parseFromFile(dirname(__FILE__) . "/data/" . $filename));
47 47
 		$events = $parser->getEvents();
48 48
 		$this->assertEquals(1, count($events));
49 49
 		$event = $events[0];
50 50
 
51 51
 		$eventRRule = $event->getRrule();
52 52
 		$this->assertEquals(count(array_keys($rrule)), count(array_keys($eventRRule)));
53
-		foreach($rrule as $k=>$v) {
53
+		foreach ($rrule as $k=>$v) {
54 54
 			$this->assertEquals($v, $eventRRule[$k]);
55 55
 		}
56 56
 	}
Please login to merge, or discard this patch.
Php/ICalDissect/tests/JMBTechnologyLimited/ICalDissect/ExDateTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
 class ExDateTest  extends \PHPUnit_Framework_TestCase {
13 13
 
14 14
 
15
-	function test1 () {
15
+	function test1() {
16 16
 		$parser = new ICalParser();
17
-		$this->assertTrue($parser->parseFromFile(dirname(__FILE__)."/data/exdate1.ics"));
17
+		$this->assertTrue($parser->parseFromFile(dirname(__FILE__) . "/data/exdate1.ics"));
18 18
 		$events = $parser->getEvents();
19 19
 		$this->assertEquals(1, count($events));
20 20
 
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 		$event = $events[0];
23 23
 
24 24
 		$eventRRule = $event->getRrule();
25
-		$rrule = array("FREQ"=>"WEEKLY","INTERVAL"=>"2","BYDAY"=>"TH");
25
+		$rrule = array("FREQ"=>"WEEKLY", "INTERVAL"=>"2", "BYDAY"=>"TH");
26 26
 		$this->assertEquals(count(array_keys($rrule)), count(array_keys($eventRRule)));
27
-		foreach($rrule as $k=>$v) {
27
+		foreach ($rrule as $k=>$v) {
28 28
 			$this->assertEquals($v, $eventRRule[$k]);
29 29
 		}
30 30
 
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
 		$this->assertEquals(1, $event->getExDatesCount());
33 33
 		/** @var $exdate ICalExDate */
34 34
 		$exdate = $event->getExDate(0);
35
-		$this->assertEquals("TZID=Europe/London",$exdate->getProperties());
36
-		$this->assertEquals("20150226T090000",$exdate->getValues());
35
+		$this->assertEquals("TZID=Europe/London", $exdate->getProperties());
36
+		$this->assertEquals("20150226T090000", $exdate->getValues());
37 37
 
38 38
 	}
39 39
 
Please login to merge, or discard this patch.
Php/ICalDissect/tests/JMBTechnologyLimited/ICalDissect/TimezoneTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,18 +13,18 @@
 block discarded – undo
13 13
 	
14 14
 	function dataForTestTimeZone1() {
15 15
 		return array(
16
-				array('London.ical','Europe/London'),
17
-				array('UTC.ical','UTC'),
18
-				array('BasicICAL.ical','UTC'),
16
+				array('London.ical', 'Europe/London'),
17
+				array('UTC.ical', 'UTC'),
18
+				array('BasicICAL.ical', 'UTC'),
19 19
 			);
20 20
 	}
21 21
 	
22 22
 	/**
23 23
      * @dataProvider dataForTestTimeZone1
24 24
      */	
25
-	function testTimeZone1 ($filename, $timeZone) {
25
+	function testTimeZone1($filename, $timeZone) {
26 26
 		$parser = new ICalParser();
27
-		$this->assertTrue($parser->parseFromFile(dirname(__FILE__)."/data/".$filename));
27
+		$this->assertTrue($parser->parseFromFile(dirname(__FILE__) . "/data/" . $filename));
28 28
 		$this->assertEquals($timeZone, $parser->getTimeZoneIdentifier());
29 29
 	}
30 30
 
Please login to merge, or discard this patch.
Classes/Hooks/KeSearchIndexer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,11 +87,11 @@
 block discarded – undo
87 87
                 $originalObject->getKeSearchTags($index),
88 88
                 "&tx_calendarize_calendar[index]={$index->getUid()}",
89 89
                 $abstract,
90
-                $index->_getProperty('_languageUid'),   // $index always has a "_languageUid" - if the $originalObject does not use translations, it is 0
90
+                $index->_getProperty('_languageUid'), // $index always has a "_languageUid" - if the $originalObject does not use translations, it is 0
91 91
                 $index->_hasProperty('starttime') ? $index->_getProperty('starttime') : 0,
92 92
                 $index->_hasProperty('endtime') ? $index->_getProperty('endtime') : 0,
93 93
                 $index->_hasProperty('fe_group') ? $index->_getProperty('fe_group') : '',
94
-                false,  // debugOnly
94
+                false, // debugOnly
95 95
                 $additionalFields
96 96
             );
97 97
         }
Please login to merge, or discard this patch.