Completed
Branch master (19a7d3)
by Tim
05:43
created
Resources/Private/Php/ics-parser/class.iCalReader.php 1 patch
Switch Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -73,38 +73,38 @@  discard block
 block discarded – undo
73 73
 
74 74
                 switch ($line) {
75 75
                 // http://www.kanzaki.com/docs/ical/vtodo.html
76
-                case "BEGIN:VTODO": 
77
-                    $this->todo_count++;
78
-                    $type = "VTODO"; 
79
-                    break; 
76
+                    case "BEGIN:VTODO": 
77
+                        $this->todo_count++;
78
+                        $type = "VTODO"; 
79
+                        break; 
80 80
 
81
-                // http://www.kanzaki.com/docs/ical/vevent.html
82
-                case "BEGIN:VEVENT": 
83
-                    $this->event_count++;
84
-                    $type = "VEVENT"; 
85
-                    break; 
81
+                    // http://www.kanzaki.com/docs/ical/vevent.html
82
+                    case "BEGIN:VEVENT": 
83
+                        $this->event_count++;
84
+                        $type = "VEVENT"; 
85
+                        break; 
86 86
 
87
-                //all other special strings
88
-                case "BEGIN:VCALENDAR": 
89
-                case "BEGIN:DAYLIGHT": 
90
-                    // http://www.kanzaki.com/docs/ical/vtimezone.html
91
-                case "BEGIN:VTIMEZONE": 
92
-                case "BEGIN:STANDARD": 
93
-                    $type = $value;
94
-                    break; 
95
-                case "END:VTODO": // end special text - goto VCALENDAR key 
96
-                case "END:VEVENT": 
97
-                case "END:VCALENDAR": 
98
-                case "END:DAYLIGHT": 
99
-                case "END:VTIMEZONE": 
100
-                case "END:STANDARD": 
101
-                    $type = "VCALENDAR"; 
102
-                    break; 
103
-                default:
104
-                    $this->addCalendarComponentWithKeyAndValue($type, 
105
-                                                               $keyword, 
106
-                                                               $value);
107
-                    break; 
87
+                    //all other special strings
88
+                    case "BEGIN:VCALENDAR": 
89
+                    case "BEGIN:DAYLIGHT": 
90
+                        // http://www.kanzaki.com/docs/ical/vtimezone.html
91
+                    case "BEGIN:VTIMEZONE": 
92
+                    case "BEGIN:STANDARD": 
93
+                        $type = $value;
94
+                        break; 
95
+                    case "END:VTODO": // end special text - goto VCALENDAR key 
96
+                    case "END:VEVENT": 
97
+                    case "END:VCALENDAR": 
98
+                    case "END:DAYLIGHT": 
99
+                    case "END:VTIMEZONE": 
100
+                    case "END:STANDARD": 
101
+                        $type = "VCALENDAR"; 
102
+                        break; 
103
+                    default:
104
+                        $this->addCalendarComponentWithKeyAndValue($type, 
105
+                                                                   $keyword, 
106
+                                                                   $value);
107
+                        break; 
108 108
                 } 
109 109
             }
110 110
             $this->process_recurrences();
@@ -132,14 +132,14 @@  discard block
 block discarded – undo
132 132
         if ($keyword == false) { 
133 133
             $keyword = $this->last_keyword; 
134 134
             switch ($component) {
135
-            case 'VEVENT': 
136
-                $value = $this->cal[$component][$this->event_count - 1]
137
-                                               [$keyword].$value;
138
-                break;
139
-            case 'VTODO' : 
140
-                $value = $this->cal[$component][$this->todo_count - 1]
141
-                                               [$keyword].$value;
142
-                break;
135
+                case 'VEVENT': 
136
+                    $value = $this->cal[$component][$this->event_count - 1]
137
+                                                   [$keyword].$value;
138
+                    break;
139
+                case 'VTODO' : 
140
+                    $value = $this->cal[$component][$this->todo_count - 1]
141
+                                                   [$keyword].$value;
142
+                    break;
143 143
             }
144 144
         }
145 145
         
@@ -149,16 +149,16 @@  discard block
 block discarded – undo
149 149
         }
150 150
 
151 151
         switch ($component) { 
152
-        case "VTODO": 
153
-            $this->cal[$component][$this->todo_count - 1][$keyword] = $value;
154
-            //$this->cal[$component][$this->todo_count]['Unix'] = $unixtime;
155
-            break; 
156
-        case "VEVENT": 
157
-            $this->cal[$component][$this->event_count - 1][$keyword] = $value; 
158
-            break; 
159
-        default: 
160
-            $this->cal[$component][$keyword] = $value; 
161
-            break; 
152
+            case "VTODO": 
153
+                $this->cal[$component][$this->todo_count - 1][$keyword] = $value;
154
+                //$this->cal[$component][$this->todo_count]['Unix'] = $unixtime;
155
+                break; 
156
+            case "VEVENT": 
157
+                $this->cal[$component][$this->event_count - 1][$keyword] = $value; 
158
+                break; 
159
+            default: 
160
+                $this->cal[$component][$keyword] = $value; 
161
+                break; 
162 162
         } 
163 163
         $this->last_keyword = $keyword; 
164 164
     }
Please login to merge, or discard this patch.