Completed
Pull Request — master (#28)
by rugk
03:18
created
samples/web/FetchPublicKey.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,8 +35,7 @@  discard block
 block discarded – undo
35 35
     $result = $connector->fetchPublicKey($threemaId);
36 36
     if($result->isSuccess()) {
37 37
     	return $result->getPublicKey();
38
-    }
39
-    else {
38
+    } else {
40 39
     	throw new Exception($result->getErrorMessage());
41 40
     }
42 41
 }
@@ -57,8 +56,7 @@  discard block
 block discarded – undo
57 56
     try {
58 57
         $publicKey = FetchPublicKey($connector, $threemaId);
59 58
         echo $publicKey;
60
-    }
61
-    catch (Exception $e) {
59
+    } catch (Exception $e) {
62 60
         http_response_code(500);
63 61
         echo $e->getMessage();
64 62
     }
Please login to merge, or discard this patch.
samples/web/index.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,7 +132,8 @@  discard block
 block discarded – undo
132 132
         <h2 id="prerequisites">Prerequisites</h2>
133 133
         <?php if ($fileConnCredentErr == '' && $fileChkPrivateKeyErr == ''): ?>
134 134
             <!-- files already exist - no need to show instructions -->
135
-        <?php else: ?>
135
+        <?php else {
136
+	: ?>
136 137
         <p>
137 138
             Before you can use this test you have to get credentials at <a href="https://gateway.threema.ch" title="Threema Gateway">gateway.threema.ch</a> and <a href="https://github.com/rugk/threema-msgapi-sdk-php/wiki/How-to-generate-a-new-key-pair-and-send-a-message">create a key pair</a>. After you did so, you have to open <code><?php echo FILENAME_CONNCRED . FILEEXT_EXAMPLE ?></code> and <code><?php echo FILENAME_PRIVKEY . FILEEXT_EXAMPLE ?></code> and add your credentials and private key. Save them without the <code><?php echo FILEEXT_EXAMPLE ?></code> file extension afterwards.
138 139
             By default these files are excluded from git pulls so you will not accidentally publish these sensitive files.
@@ -192,7 +193,9 @@  discard block
 block discarded – undo
192 193
                 You did not prepared your setup correctly to use the test. Please follow the intructions above to setup your environment.
193 194
             </div>
194 195
         <?php else: ?>
195
-            <form id="mainform" action="." method="<?php echo $_SERVER['REQUEST_METHOD']; ?>">
196
+            <form id="mainform" action="." method="<?php echo $_SERVER['REQUEST_METHOD'];
197
+}
198
+?>">
196 199
                 <div class="formcontainer">
197 200
                     <fieldset id="field_generalsettings">
198 201
                         <legend>General settings</legend>
Please login to merge, or discard this patch.