Completed
Push — develop ( b91125...52c290 )
by Seth
03:00
created
src/SyncIntoCanvas/Filter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
     public function setEnabled($enabled)
33 33
     {
34
-        $this->enabled = (boolean) $enabled;
34
+        $this->enabled = (boolean)$enabled;
35 35
     }
36 36
 
37 37
     public function isEnabled()
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
     public function setIncludeExpression($regex)
43 43
     {
44
-        $this->include = (string) $regex;
44
+        $this->include = (string)$regex;
45 45
     }
46 46
 
47 47
     public function getIncludeExpression()
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
     public function setExcludeExpression($regex)
56 56
     {
57
-        $this->exclude = (string) $regex;
57
+        $this->exclude = (string)$regex;
58 58
     }
59 59
 
60 60
     public function getExcludeExpression()
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
                (
75 75
                    ( // if filtering is on, and there's an include pattern test that pattern...
76 76
                        $this->getIncludeExpression() &&
77
-                       preg_match('%' . $this->getIncludeExpression() . '%', $event->getProperty('SUMMARY'))
77
+                       preg_match('%'.$this->getIncludeExpression().'%', $event->getProperty('SUMMARY'))
78 78
                    )
79 79
                ) &&
80 80
                !( // if there is an exclude pattern, make sure that this event is NOT excluded
81 81
                    $this->getExcludeExpression() &&
82
-                   preg_match('%' . $this->getExcludeExpression() . '%', $event->getProperty('SUMMARY'))
82
+                   preg_match('%'.$this->getExcludeExpression().'%', $event->getProperty('SUMMARY'))
83 83
                )
84 84
            )
85 85
         );
Please login to merge, or discard this patch.
src/SyncIntoCanvas/Schedule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@
 block discarded – undo
14 14
         if (empty($this->syncTimestamp)) {
15 15
             $timestamp = new DateTime();
16 16
             $this->syncTimestamp =
17
-                $timestamp->format(Constants::SYNC_TIMESTAMP_FORMAT) .
18
-                Constants::SEPARATOR . md5(
17
+                $timestamp->format(Constants::SYNC_TIMESTAMP_FORMAT).
18
+                Constants::SEPARATOR.md5(
19 19
                     (php_sapi_name() == 'cli' ?
20 20
                         'cli' : $_SERVER['REMOTE_ADDR']
21
-                    ) . time()
21
+                    ).time()
22 22
                 );
23 23
         }
24 24
         return $this->syncTimestamp;
Please login to merge, or discard this patch.
src/SyncIntoCanvas/CalendarContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
          * TODO: it would probably be better to look up users by email address than URL
51 51
          */
52 52
         /* get the context (user, course or group) for the canvas URL */
53
-        if (preg_match('%(https?://)?(' . parse_url($_SESSION[Constants::CANVAS_INSTANCE_URL], PHP_URL_HOST) . '/((about/(\d+))|(courses/(\d+)(/groups/(\d+))?)|(accounts/\d+/groups/(\d+))))%', $canvasUrl, $match)) {
53
+        if (preg_match('%(https?://)?('.parse_url($_SESSION[Constants::CANVAS_INSTANCE_URL], PHP_URL_HOST).'/((about/(\d+))|(courses/(\d+)(/groups/(\d+))?)|(accounts/\d+/groups/(\d+))))%', $canvasUrl, $match)) {
54 54
             $this->canonicalUrl = "https://{$match[2]}"; // https://stmarksschool.instructure.com/courses/953
55 55
 
56 56
             // course or account groups
Please login to merge, or discard this patch.
src/SyncIntoCanvas/Calendar.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function setName($name)
116 116
     {
117
-        $this->name = (string) $name;
117
+        $this->name = (string)$name;
118 118
     }
119 119
 
120 120
     /**
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
     protected function getPairingHash()
155 155
     {
156 156
         global $metadata;
157
-        return md5($this->getContext() . $this->getFeedUrl());
157
+        return md5($this->getContext().$this->getFeedUrl());
158 158
     }
159 159
 
160 160
     public function save()
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
     public static function load($id)
213 213
     {
214 214
         $sql = static::getMySql();
215
-        $query = "SELECT * FROM `calendars` WHERE `id` = '" . $sql->escape_string($id) . "'";
215
+        $query = "SELECT * FROM `calendars` WHERE `id` = '".$sql->escape_string($id)."'";
216 216
         $response = $sql->query($query);
217 217
         if ($response) {
218 218
             $calendar = $response->fetch_assoc();
Please login to merge, or discard this patch.