@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function test_plugininfo() |
15 | 15 | { |
16 | - $file = __DIR__ . '/../plugin.info.txt'; |
|
16 | + $file = __DIR__.'/../plugin.info.txt'; |
|
17 | 17 | $this->assertFileExists($file); |
18 | 18 | |
19 | 19 | $info = confToHash($file); |
@@ -39,11 +39,11 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function test_plugin_conf() |
41 | 41 | { |
42 | - $conf_file = __DIR__ . '/../conf/default.php'; |
|
42 | + $conf_file = __DIR__.'/../conf/default.php'; |
|
43 | 43 | if (file_exists($conf_file)) { |
44 | 44 | include($conf_file); |
45 | 45 | } |
46 | - $meta_file = __DIR__ . '/../conf/metadata.php'; |
|
46 | + $meta_file = __DIR__.'/../conf/metadata.php'; |
|
47 | 47 | if (file_exists($meta_file)) { |
48 | 48 | include($meta_file); |
49 | 49 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $this->assertEquals( |
52 | 52 | gettype($conf), |
53 | 53 | gettype($meta), |
54 | - 'Both ' . DOKU_PLUGIN . 'swarmwebhook/conf/default.php and ' . DOKU_PLUGIN . 'swarmwebhook/conf/metadata.php have to exist and contain the same keys.' |
|
54 | + 'Both '.DOKU_PLUGIN.'swarmwebhook/conf/default.php and '.DOKU_PLUGIN.'swarmwebhook/conf/metadata.php have to exist and contain the same keys.' |
|
55 | 55 | ); |
56 | 56 | |
57 | 57 | if (gettype($conf) != 'NULL' && gettype($meta) != 'NULL') { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $this->assertArrayHasKey( |
60 | 60 | $key, |
61 | 61 | $meta, |
62 | - 'Key $meta[\'' . $key . '\'] missing in ' . DOKU_PLUGIN . 'swarmwebhook/conf/metadata.php' |
|
62 | + 'Key $meta[\''.$key.'\'] missing in '.DOKU_PLUGIN.'swarmwebhook/conf/metadata.php' |
|
63 | 63 | ); |
64 | 64 | } |
65 | 65 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $this->assertArrayHasKey( |
68 | 68 | $key, |
69 | 69 | $conf, |
70 | - 'Key $conf[\'' . $key . '\'] missing in ' . DOKU_PLUGIN . 'swarmwebhook/conf/default.php' |
|
70 | + 'Key $conf[\''.$key.'\'] missing in '.DOKU_PLUGIN.'swarmwebhook/conf/default.php' |
|
71 | 71 | ); |
72 | 72 | } |
73 | 73 | } |
@@ -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>'; |
@@ -6,5 +6,5 @@ |
||
6 | 6 | */ |
7 | 7 | |
8 | 8 | // keys need to match the config setting name |
9 | - $lang['hook_secret'] = 'Secret in the Webhhok. Fill for IFTTT. Broken for Zapier |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | // phpcs:disable PSR1.Files.SideEffects |
3 | 3 | if (!defined('DOKU_INC')) { |
4 | - define('DOKU_INC', realpath(dirname(__FILE__) . '/../../../') . '/'); |
|
4 | + define('DOKU_INC', realpath(dirname(__FILE__).'/../../../').'/'); |
|
5 | 5 | } |
6 | 6 | define('NOSESSION', 1); |
7 | -require_once(DOKU_INC . 'inc/init.php'); |
|
7 | +require_once(DOKU_INC.'inc/init.php'); |
|
8 | 8 | if (!defined('DOKU_TESTING')) { |
9 | 9 | // Main |
10 | 10 | $hook = \dokuwiki\plugin\swarmwebhook\webhooks\AbstractWebhook::getWebhook(); |