@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | { |
52 | 52 | $tzSign = $payloadTimezoneOffset >= 0 ? '+' : '-'; |
53 | 53 | $offsetInHours = $payloadTimezoneOffset / 60; |
54 | - $tz = $tzSign . str_pad($offsetInHours * 100, 4, '0', STR_PAD_LEFT); |
|
54 | + $tz = $tzSign.str_pad($offsetInHours * 100, 4, '0', STR_PAD_LEFT); |
|
55 | 55 | $dateTime = new DateTime('now', new DateTimeZone($tz)); |
56 | 56 | $dateTime->setTimestamp($timestamp); |
57 | 57 | return $dateTime; |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | */ |
112 | 112 | public function createNewSwarmSchema() |
113 | 113 | { |
114 | - $json = file_get_contents(__DIR__ . '/swarm.struct.json'); |
|
114 | + $json = file_get_contents(__DIR__.'/swarm.struct.json'); |
|
115 | 115 | $builder = new SchemaImporter('swarm', $json, true); |
116 | 116 | if (!$builder->build()) { |
117 | 117 | msg('something went wrong while saving', -1); |
@@ -148,9 +148,9 @@ |
||
148 | 148 | dbglog(DateTime::getLastErrors()); |
149 | 149 | $dateTime = new DateTime('now'); |
150 | 150 | } |
151 | - $guessedOffset = round(($dateTime->getTimestamp() - $nowTS)/3600)*100; |
|
151 | + $guessedOffset = round(($dateTime->getTimestamp() - $nowTS) / 3600) * 100; |
|
152 | 152 | $sign = $guessedOffset > 0 ? '+' : ''; |
153 | 153 | |
154 | - return $sign . (string)$guessedOffset; |
|
154 | + return $sign.(string) $guessedOffset; |
|
155 | 155 | } |
156 | 156 | } |
@@ -15,28 +15,28 @@ discard block |
||
15 | 15 | if (empty($secret)) { |
16 | 16 | $exampleSecret = md5(time()); |
17 | 17 | $settingsID = 'plugin____swarmwebhook____plugin_settings_name'; |
18 | - $configHRef = DOKU_REL . DOKU_SCRIPT . '?do=admin&page=config#' . $settingsID; |
|
19 | - $configLink = '<a href="' . $configHRef . '">' . $this->getLang('configuration') . '</a>'; |
|
18 | + $configHRef = DOKU_REL.DOKU_SCRIPT.'?do=admin&page=config#'.$settingsID; |
|
19 | + $configLink = '<a href="'.$configHRef.'">'.$this->getLang('configuration').'</a>'; |
|
20 | 20 | $secretNeededMsg = sprintf( |
21 | 21 | $this->getLang('secret needed'), |
22 | 22 | $configLink, |
23 | - '<code>' . $exampleSecret . '</code>' |
|
23 | + '<code>'.$exampleSecret.'</code>' |
|
24 | 24 | ); |
25 | - echo '<p>' . $secretNeededMsg . '</p>'; |
|
25 | + echo '<p>'.$secretNeededMsg.'</p>'; |
|
26 | 26 | return; |
27 | 27 | } |
28 | 28 | $htmlIFTTT = '<h2>IFTTT</h2>'; |
29 | 29 | $htmlIFTTT .= '<ol>'; |
30 | 30 | $htmlIFTTT .= '<li>'; |
31 | 31 | $iftttFormHref = 'https://ifttt.com/create/if-any-new-check-in-then-make-a-web-request?sid=5'; |
32 | - $htmlIFTTT .= 'Go to <a href="' . $iftttFormHref . '">the relevant IFTTT form</a>'; |
|
32 | + $htmlIFTTT .= 'Go to <a href="'.$iftttFormHref.'">the relevant IFTTT form</a>'; |
|
33 | 33 | $htmlIFTTT .= '</li>'; |
34 | 34 | $htmlIFTTT .= '<li>'; |
35 | 35 | $htmlIFTTT .= 'Enter the following Data in the Form:'; |
36 | 36 | $htmlIFTTT .= '<ul>'; |
37 | 37 | $htmlIFTTT .= '<li>'; |
38 | - $webhookURL = DOKU_URL . 'lib/plugins/swarmwebhook/webhook.php'; |
|
39 | - $htmlIFTTT .= '<strong>URL</strong>: <code>' . $webhookURL . '</code>'; |
|
38 | + $webhookURL = DOKU_URL.'lib/plugins/swarmwebhook/webhook.php'; |
|
39 | + $htmlIFTTT .= '<strong>URL</strong>: <code>'.$webhookURL.'</code>'; |
|
40 | 40 | $htmlIFTTT .= '</li>'; |
41 | 41 | $htmlIFTTT .= '<li>'; |
42 | 42 | $htmlIFTTT .= '<strong>Method</strong>: POST'; |
@@ -51,10 +51,10 @@ discard block |
||
51 | 51 | "VenueName": "{{VenueName}}", |
52 | 52 | "VenueUrl": "{{VenueUrl}}", |
53 | 53 | "VenueMapImageUrl": "{{VenueMapImageUrl}}", |
54 | -"secret": "'. $secret . '" |
|
54 | +"secret": "'. $secret.'" |
|
55 | 55 | }'; |
56 | 56 | $htmlIFTTT .= '<li>'; |
57 | - $htmlIFTTT .= '<strong>Body</strong>: <pre>' . $iftttBody . '</pre>'; |
|
57 | + $htmlIFTTT .= '<strong>Body</strong>: <pre>'.$iftttBody.'</pre>'; |
|
58 | 58 | $htmlIFTTT .= '</li>'; |
59 | 59 | $htmlIFTTT .= '</ul>'; |
60 | 60 | $htmlIFTTT .= '</li>'; |
@@ -5,5 +5,5 @@ |
||
5 | 5 | * @author Michael Große <[email protected]> |
6 | 6 | */ |
7 | 7 | |
8 | -$meta['service'] = array('multichoice','_choices' => array('IFTTT','Zapier')); |
|
8 | +$meta['service'] = array('multichoice', '_choices' => array('IFTTT', 'Zapier')); |
|
9 | 9 | $meta['hook_secret'] = array('password'); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | /** @var array alway enable the needed plugins */ |
14 | 14 | protected $pluginsEnabled = ['swarmwebhook', 'struct', 'sqlite']; |
15 | 15 | |
16 | - function setUp(){ |
|
16 | + function setUp() { |
|
17 | 17 | global $conf; |
18 | 18 | |
19 | 19 | parent::setUp(); |