Completed
Push — master ( ea5582...dd6b15 )
by Cedric
06:36
created
src/ClientBuilder.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
     /**
62 62
      * ClientBuilder constructor.
63 63
      *
64
-     * @param                                                        $baseUri
64
+     * @param                                                        string $baseUri
65 65
      * @param AuthenticationInterface                                $authentication
66 66
      */
67 67
     private function __construct($baseUri, AuthenticationInterface $authentication)
Please login to merge, or discard this 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.
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/Service/SpaceService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             SpaceCollection::class
37 37
         );
38 38
 
39
-        if(!$spaceCollection instanceof SpaceCollection){
39
+        if (!$spaceCollection instanceof SpaceCollection) {
40 40
             return null;
41 41
         }
42 42
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             Space::class
59 59
         );
60 60
 
61
-        if(!$space instanceof Space){
61
+        if (!$space instanceof Space) {
62 62
             return null;
63 63
         }
64 64
 
Please login to merge, or discard this patch.
src/Service/ContentService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             ContentCollection::class
46 46
         );
47 47
 
48
-        if(!$contentCollection instanceof ContentCollection){
48
+        if (!$contentCollection instanceof ContentCollection) {
49 49
             return null;
50 50
         }
51 51
 
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function findById($id)
63 63
     {
64
-        $content = $this->get('content/' . $id);
64
+        $content = $this->get('content/'.$id);
65 65
         $content = $this->deserialize(
66 66
             $content,
67 67
             Content::class
68 68
         );
69 69
 
70
-        if(!$content instanceof Content){
70
+        if (!$content instanceof Content) {
71 71
             return null;
72 72
         }
73 73
 
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.