@@ -34,6 +34,9 @@ discard block |
||
34 | 34 | $this->setExcludeExpression($exclude); |
35 | 35 | } |
36 | 36 | |
37 | + /** |
|
38 | + * @param boolean $enabled |
|
39 | + */ |
|
37 | 40 | public function setEnabled($enabled) |
38 | 41 | { |
39 | 42 | $this->enabled = (boolean) $enabled; |
@@ -44,6 +47,9 @@ discard block |
||
44 | 47 | return $enabled; |
45 | 48 | } |
46 | 49 | |
50 | + /** |
|
51 | + * @param string|null $regex |
|
52 | + */ |
|
47 | 53 | public function setIncludeExpression($regex) |
48 | 54 | { |
49 | 55 | $this->include = (string) $regex; |
@@ -57,6 +63,9 @@ discard block |
||
57 | 63 | return $this->include; |
58 | 64 | } |
59 | 65 | |
66 | + /** |
|
67 | + * @param string|null $regex |
|
68 | + */ |
|
60 | 69 | public function setExcludeExpression($regex) |
61 | 70 | { |
62 | 71 | $this->exclude = (string) $regex; |
@@ -323,6 +323,9 @@ |
||
323 | 323 | $this->log(static::getTimestamp() . ' sync finished', $log); |
324 | 324 | } |
325 | 325 | |
326 | + /** |
|
327 | + * @param string $message |
|
328 | + */ |
|
326 | 329 | private function log($message, Log $log, $flag = PEAR_LOG_INFO) |
327 | 330 | { |
328 | 331 | if ($log) { |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace smtech\CanvasICSSync\SyncIntoCanvas; |
4 | 4 | |
5 | -use DateTime; |
|
6 | 5 | use vcalendar; |
7 | 6 | use Battis\DataUtilities; |
8 | 7 |
@@ -13,8 +13,7 @@ discard block |
||
13 | 13 | |
14 | 14 | /* store any requested actions for future handling */ |
15 | 15 | $action = (empty($_REQUEST['action']) ? |
16 | - ACTION_UNSPECIFIED : |
|
17 | - strtolower($_REQUEST['action']) |
|
16 | + ACTION_UNSPECIFIED : strtolower($_REQUEST['action']) |
|
18 | 17 | ); |
19 | 18 | |
20 | 19 | /* action requests only come from outside the LTI! */ |
@@ -49,8 +48,7 @@ discard block |
||
49 | 48 | /* if not authenticated, default to showing credentials */ |
50 | 49 | } else { |
51 | 50 | $action = (empty($action) ? |
52 | - ACTION_CONFIG : |
|
53 | - $action |
|
51 | + ACTION_CONFIG : $action |
|
54 | 52 | ); |
55 | 53 | } |
56 | 54 | |
@@ -59,7 +57,7 @@ discard block |
||
59 | 57 | /* reset cached install data from config file */ |
60 | 58 | case ACTION_INSTALL: |
61 | 59 | $_SESSION['toolbox'] = Toolbox::fromConfiguration(CONFIG_FILE, true); |
62 | - $toolbox =& $_SESSION['toolbox']; |
|
60 | + $toolbox = & $_SESSION['toolbox']; |
|
63 | 61 | |
64 | 62 | /* test to see if we can connect to the API */ |
65 | 63 | try { |
@@ -13,9 +13,9 @@ |
||
13 | 13 | |
14 | 14 | /* prepare the toolbox */ |
15 | 15 | if (empty($_SESSION[Toolbox::class])) { |
16 | - $_SESSION[Toolbox::class] =& Toolbox::fromConfiguration(CONFIG_FILE); |
|
16 | + $_SESSION[Toolbox::class] = & Toolbox::fromConfiguration(CONFIG_FILE); |
|
17 | 17 | } |
18 | -$toolbox =& $_SESSION[Toolbox::class]; |
|
18 | +$toolbox = & $_SESSION[Toolbox::class]; |
|
19 | 19 | $toolbox->smarty_prependTemplateDir(__DIR__ . '/templates', basename(__DIR__)); |
20 | 20 | $toolbox->smarty_assign([ |
21 | 21 | 'category' => DataUtilities::titleCase(preg_replace('/[\-_]+/', ' ', basename(__DIR__))) |
@@ -220,6 +220,10 @@ discard block |
||
220 | 220 | } |
221 | 221 | } |
222 | 222 | |
223 | + /** |
|
224 | + * @param string $timestamp |
|
225 | + * @param Calendar $calendar |
|
226 | + */ |
|
223 | 227 | public static function purgeUnmatched($timestamp, $calendar) |
224 | 228 | { |
225 | 229 | $findDeletedEvents = static::getDatabase()->prepare( |
@@ -285,6 +289,9 @@ discard block |
||
285 | 289 | } |
286 | 290 | } |
287 | 291 | |
292 | + /** |
|
293 | + * @param Calendar $calendar |
|
294 | + */ |
|
288 | 295 | public static function load($id, $calendar) |
289 | 296 | { |
290 | 297 | $select = static::getDatabase()->prepare( |