Completed
Push — develop ( 4e1ddc...b1c313 )
by Seth
02:25
created
src/SyncIntoCanvas/Calendar.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      */
119 119
     public function setName($name)
120 120
     {
121
-        $this->name = (string) $name;
121
+        $this->name = (string)$name;
122 122
     }
123 123
 
124 124
     /**
@@ -157,12 +157,12 @@  discard block
 block discarded – undo
157 157
      **/
158 158
     protected function getId($algorithm = 'md5')
159 159
     {
160
-        return hash($algorithm, $this->getContext()->getCanonicalUrl() . $this->getFeedUrl());
160
+        return hash($algorithm, $this->getContext()->getCanonicalUrl().$this->getFeedUrl());
161 161
     }
162 162
 
163 163
     public function getContextCode()
164 164
     {
165
-        return $this->getContext()->getContext() . '_' . $this->getContext()->getId();
165
+        return $this->getContext()->getContext().'_'.$this->getContext()->getId();
166 166
     }
167 167
 
168 168
     public function save()
@@ -257,11 +257,11 @@  discard block
 block discarded – undo
257 257
             $this->logThrow(new Exception("Cannot sync calendars without a valid Canvas context"), $log);
258 258
         }
259 259
 
260
-        if (!DataUtilities::URLexists($this>getFeedUrl())) {
260
+        if (!DataUtilities::URLexists($this > getFeedUrl())) {
261 261
             $this->logThrow(new Exception("Cannot sync calendars with a valid calendar feed"), $log);
262 262
         }
263 263
 
264
-        $this->log(static::getTimestamp() . ' sync started', $log);
264
+        $this->log(static::getTimestamp().' sync started', $log);
265 265
 
266 266
         $this->save();
267 267
 
@@ -285,10 +285,10 @@  discard block
 block discarded – undo
285 285
          *     today's date, probably a better system? issue:12
286 286
          */
287 287
         foreach ($ics->selectComponents(
288
-            date('Y')-1, // startYear
288
+            date('Y') - 1, // startYear
289 289
             date('m'), // startMonth
290 290
             date('d'), // startDay
291
-            date('Y')+1, // endYEar
291
+            date('Y') + 1, // endYEar
292 292
             date('m'), // endMonth
293 293
             date('d'), // endDay
294 294
             'vevent', // cType
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
             $this->logThrow($e, $log);
321 321
         }
322 322
 
323
-        $this->log(static::getTimestamp() . ' sync finished', $log);
323
+        $this->log(static::getTimestamp().' sync finished', $log);
324 324
     }
325 325
 
326 326
     private function log($message, Log $log, $flag = PEAR_LOG_INFO)
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
         $flag = PEAR_LOG_ERR
337 337
     ) {
338 338
         if ($log) {
339
-            $log->log($e->getMessage() . ': ' . $e->getTraceAsString(), $flag);
339
+            $log->log($e->getMessage().': '.$e->getTraceAsString(), $flag);
340 340
         } else {
341 341
             throw $e;
342 342
         }
Please login to merge, or discard this patch.