Completed
Push — master ( 3be450...52e56e )
by Cedric
02:45
created
playground.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 if (file_exists('payload.json')) {
15 15
     $payload = json_decode(file_get_contents('payload.json'));
16 16
     $sharedSecret = $payload->sharedSecret;
17
-    $baseUrl = $payload->baseUrl . '/';
17
+    $baseUrl = $payload->baseUrl.'/';
18 18
 }
19 19
 
20 20
 
Please login to merge, or discard this patch.
src/HttpClient/HttpClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
             $options['headers']['content-type'] = 'application/json';
56 56
         }
57 57
 
58
-        return $this->client->request($method, 'rest/api/' . $uri, $options);
58
+        return $this->client->request($method, 'rest/api/'.$uri, $options);
59 59
     }
60 60
 
61 61
     /**
Please login to merge, or discard this patch.
src/ClientBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
     private function buildDefaultSerializer()
119 119
     {
120 120
         return SerializerBuilder::create()
121
-            ->addMetadataDir(__DIR__ . '/Resources/serializer', __NAMESPACE__)
121
+            ->addMetadataDir(__DIR__.'/Resources/serializer', __NAMESPACE__)
122 122
             ->addDefaultHandlers()
123 123
             ->build();
124 124
     }
Please login to merge, or discard this patch.
src/Service/AbstractApiService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      *
62 62
      * @return mixed
63 63
      */
64
-    protected function mergeQueryOptions(array $oldQueryOptions, array $newQueryOptions){
64
+    protected function mergeQueryOptions(array $oldQueryOptions, array $newQueryOptions) {
65 65
         return array_merge_recursive(
66 66
             $oldQueryOptions,
67 67
             $newQueryOptions
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 if (file_exists('payload.json')) {
20 20
     $payload = json_decode(file_get_contents('payload.json'));
21 21
     $sharedSecret = $payload->sharedSecret;
22
-    $baseUrl = $payload->baseUrl . '/';
22
+    $baseUrl = $payload->baseUrl.'/';
23 23
 }
24 24
 
25 25
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 $app = new Application();
39 39
 $app['debug'] = true;
40 40
 $app->register(new Silex\Provider\TwigServiceProvider(), array(
41
-    'twig.path' => __DIR__ . '/views',
41
+    'twig.path' => __DIR__.'/views',
42 42
 ));
43 43
 
44 44
 /**
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
  * You can validate your descriptor
50 50
  * @see https://atlassian-connect-validator.herokuapp.com/validate
51 51
  */
52
-$app->get('/descriptor.json', function (Request $request) {
52
+$app->get('/descriptor.json', function(Request $request) {
53 53
 
54 54
     /*
55 55
      * We have to construct the correct URL in order to confluence be able to contact us
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         'authentication' => [
68 68
             'type' => 'jwt'
69 69
         ],
70
-        'baseUrl' => $scheme . '://' . $host,
70
+        'baseUrl' => $scheme.'://'.$host,
71 71
         'scopes' => [
72 72
             'read'
73 73
         ],
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
  * They will give us a payload containing the sharedSecret we'll need to use to sign our request.
85 85
  * For the demo we just save the content to a file.
86 86
  */
87
-$app->post('/installed', function (Request $request) {
87
+$app->post('/installed', function(Request $request) {
88 88
 
89 89
     $payload = $request->getContent();
90 90
     file_put_contents('payload.json', $payload);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
  * Even if the documentation tell's you the only needed webhook is the installed one,
101 101
  * they won't let you enable the add-on unless you define the route to you 'enabled' webhook.
102 102
  */
103
-$app->post('/enabled', function () {
103
+$app->post('/enabled', function() {
104 104
     /**
105 105
      * Be sure to send a 200 OK response, or the app will tell you that your plugin can't be enabled.
106 106
      */
@@ -108,20 +108,20 @@  discard block
 block discarded – undo
108 108
 });
109 109
 
110 110
 //Catch all route to run our test code
111
-$app->match('/api/{url}', function ($url) use ($client) {
111
+$app->match('/api/{url}', function($url) use ($client) {
112 112
     $response = $client->sendRawApiRequest('GET', $url);
113 113
     $content = $response->getBody()->getContents();
114 114
     return new Response($content, $response->getStatusCode());
115 115
 
116 116
 })->assert('url', '.+');
117 117
 
118
-$app->match('/image/{url}', function ($url) use ($client) {
118
+$app->match('/image/{url}', function($url) use ($client) {
119 119
     $response = $client->downloadAttachment($url);
120 120
     $content = $response->getBody()->getContents();
121 121
     return new Response($content, $response->getStatusCode(), $response->getHeaders());
122 122
 })->assert('url', '.+');
123 123
 
124
-$app->match('/', function (Application $app) {
124
+$app->match('/', function(Application $app) {
125 125
     return $app['twig']->render("index.html.twig");
126 126
 });
127 127
 
Please login to merge, or discard this patch.
src/Service/AbstractService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 
62 62
         $object = $this->serializer->deserialize($json, $type, 'json', $context);
63 63
 
64
-        if(!$object instanceof $type){
64
+        if (!$object instanceof $type) {
65 65
             return null;
66 66
         }
67 67
 
Please login to merge, or discard this patch.
src/Service/ContentService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 
51 51
     public function findById($id)
52 52
     {
53
-        $content = $this->get('content/' . $id);
53
+        $content = $this->get('content/'.$id);
54 54
         return $this->deserialize(
55 55
             $content,
56 56
             Content::class
Please login to merge, or discard this patch.