Completed
Push — master ( b025b6...f2ccb8 )
by Cedric
03:08
created
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.
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.
src/Exception/ExceptionWrapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
     private function getExceptionMessageForResponse($response = null)
126 126
     {
127 127
 
128
-        if(null === $response){
128
+        if (null === $response) {
129 129
             return null;
130 130
         }
131 131
 
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
playground.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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');
Please login to merge, or discard this patch.