@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | $app = new Application(); |
| 37 | 37 | $app['debug'] = true; |
| 38 | 38 | $app->register(new Silex\Provider\TwigServiceProvider(), array( |
| 39 | - 'twig.path' => __DIR__ . '/views', |
|
| 39 | + 'twig.path' => __DIR__.'/views', |
|
| 40 | 40 | )); |
| 41 | 41 | |
| 42 | 42 | /** |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | * You can validate your descriptor |
| 48 | 48 | * @see https://atlassian-connect-validator.herokuapp.com/validate |
| 49 | 49 | */ |
| 50 | -$app->get('/descriptor.json', function (Request $request) use ($applicationKey) { |
|
| 50 | +$app->get('/descriptor.json', function(Request $request) use ($applicationKey) { |
|
| 51 | 51 | |
| 52 | 52 | /* |
| 53 | 53 | * We have to construct the correct URL in order to confluence be able to contact us |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $scheme = 'https'; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - $descriptor = new Descriptor( $scheme . '://' . $host, $applicationKey); |
|
| 63 | + $descriptor = new Descriptor($scheme.'://'.$host, $applicationKey); |
|
| 64 | 64 | |
| 65 | 65 | $descriptor->addScope(Descriptor::SCOPE_READ) |
| 66 | 66 | ->setLifecycleWebhooks( |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * They will give us a payload containing the sharedSecret we'll need to use to sign our request. |
| 77 | 77 | * For the demo we just save the content to a file. |
| 78 | 78 | */ |
| 79 | -$app->post('/installed', function (Request $request) { |
|
| 79 | +$app->post('/installed', function(Request $request) { |
|
| 80 | 80 | |
| 81 | 81 | $payload = $request->getContent(); |
| 82 | 82 | file_put_contents('payload.json', $payload); |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | * Even if the documentation tell's you the only needed webhook is the installed one, |
| 93 | 93 | * they won't let you enable the add-on unless you define the route to you 'enabled' webhook. |
| 94 | 94 | */ |
| 95 | -$app->post('/enabled', function () { |
|
| 95 | +$app->post('/enabled', function() { |
|
| 96 | 96 | /** |
| 97 | 97 | * Be sure to send a 200 OK response, or the app will tell you that your plugin can't be enabled. |
| 98 | 98 | */ |
@@ -100,20 +100,20 @@ discard block |
||
| 100 | 100 | }); |
| 101 | 101 | |
| 102 | 102 | //Catch all route to run our test code |
| 103 | -$app->match('/api/{url}', function ($url) use ($client) { |
|
| 103 | +$app->match('/api/{url}', function($url) use ($client) { |
|
| 104 | 104 | $response = $client->sendRawApiRequest('GET', $url); |
| 105 | 105 | $content = $response->getBody()->getContents(); |
| 106 | 106 | return new Response($content, $response->getStatusCode()); |
| 107 | 107 | |
| 108 | 108 | })->assert('url', '.+'); |
| 109 | 109 | |
| 110 | -$app->match('/image/{url}', function ($url) use ($client) { |
|
| 110 | +$app->match('/image/{url}', function($url) use ($client) { |
|
| 111 | 111 | $response = $client->downloadAttachment($url); |
| 112 | 112 | $content = $response->getBody()->getContents(); |
| 113 | 113 | return new Response($content, $response->getStatusCode(), $response->getHeaders()); |
| 114 | 114 | })->assert('url', '.+'); |
| 115 | 115 | |
| 116 | -$app->match('/', function (Application $app) { |
|
| 116 | +$app->match('/', function(Application $app) { |
|
| 117 | 117 | return $app['twig']->render("index.html.twig"); |
| 118 | 118 | }); |
| 119 | 119 | |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | $payload = new Payload('payload.json'); |
| 16 | 16 | |
| 17 | 17 | |
| 18 | -$authenticationMethod = new QueryParamAuthentication('eu.adlogix.confluence-client', $payload->getSharedSecret()); |
|
| 18 | +$authenticationMethod = new QueryParamAuthentication('eu.adlogix.confluence-client', $payload->getSharedSecret()); |
|
| 19 | 19 | /** @var \Adlogix\ConfluenceClient\Client $client */ |
| 20 | 20 | $client = ClientBuilder::create($payload->getBaseUrl(), $authenticationMethod) |
| 21 | 21 | ->setDebug(true) |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | $response = $client->sendRawApiRequest('GET', 'space'); |
| 26 | 26 | echo $response->getBody()->getContents(); |
| 27 | 27 | |
| 28 | -echo "\r\n\r\n=======================================================================================================" . |
|
| 28 | +echo "\r\n\r\n=======================================================================================================". |
|
| 29 | 29 | "==============================================================================================\r\n\r\n"; |
| 30 | 30 | |
| 31 | 31 | $response = $client->downloadAttachment('download/attachments/197288/Seller%20Admin%20logo%20stats.png?api=v2'); |