Failed Conditions
Push — future/ConfuenceWrapper ( 63d44f...28d061 )
by
unknown
03:28
created
src/ConfluenceImporter/Service/Confluence/Instance.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Creator: adamgrabek
4
- * Date: 13.01.2016
5
- * Time: 15:06
6
- */
3
+     * Creator: adamgrabek
4
+     * Date: 13.01.2016
5
+     * Time: 15:06
6
+     */
7 7
 
8 8
 namespace CodeMine\ConfluenceImporter\Service\Confluence;
9 9
 
Please login to merge, or discard this patch.
src/ConfluenceImporter/Service/Confluence.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use CodeMine\ConfluenceImporter\Documentation\PageInterface;
6 6
 use CodeMine\ConfluenceImporter\Service\Confluence\InstanceInterface;
7 7
 use GuzzleHttp\ClientInterface;
8
-use GuzzleHttp\Exception\BadResponseException;
9 8
 use GuzzleHttp\Exception\ClientException;
10 9
 use GuzzleHttp\Psr7\Request;
11 10
 
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
             $request = $this->getRequest($headers, $body);
54 54
             $response = $this->client->send($request); //TODO: find solution for exception on same page name
55 55
             $pageChildren = $page->children();
56
-            if (null !== $pageChildren){
56
+            if (null !== $pageChildren) {
57 57
                 var_dump('1');
58
-                var_dump(urlencode('"sda sd"'));die;
59
-                foreach($pageChildren as $pageChild){
58
+                var_dump(urlencode('"sda sd"')); die;
59
+                foreach ($pageChildren as $pageChild) {
60 60
                     var_dump('2');
61 61
 
62 62
                     $childBody = $this->getBody($key, $pageChild, $page);
@@ -66,16 +66,16 @@  discard block
 block discarded – undo
66 66
                         var_dump('3');
67 67
 
68 68
                         $this->client->send($request);
69
-                    }catch(\Exception $e){
69
+                    } catch (\Exception $e) {
70 70
                         var_dump($e->getMessage());
71 71
                     }
72 72
                 }
73 73
 
74
-                var_dump(urlencode('"sda sd"'));die;
74
+                var_dump(urlencode('"sda sd"')); die;
75 75
 
76 76
             }
77 77
 //            var_dump($response->);
78
-        }catch(ClientException $e){
78
+        } catch (ClientException $e) {
79 79
 
80 80
             echo 'ERROR!';
81 81
             var_dump($e->getMessage());
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         }
86 86
         $returnBody = $response->getBody();
87 87
         $stdBody = json_decode($returnBody->getContents());
88
-        $pageId = (string)$stdBody->id;
88
+        $pageId = (string) $stdBody->id;
89 89
 
90 90
         return TRUE;
91 91
     }
@@ -107,12 +107,12 @@  discard block
 block discarded – undo
107 107
             var_dump('try');
108 108
 //var_dump($request);die;
109 109
             $response = $this->client->send($request);
110
-        }catch(\Exception $e){
110
+        } catch (\Exception $e) {
111 111
             var_dump('EEEEEEEEEEEEEEEERRRROOOOOOOOOOOOR');
112 112
             var_dump($e->getMessage());
113 113
             die;
114 114
         }
115
-var_dump($response->getBody());die;
115
+var_dump($response->getBody()); die;
116 116
         /** @var Stream $returnBody */
117 117
         $returnBody = $response->getBody();
118 118
         $returnBody->
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
 //        var_dump(count($stdBody->results));
126 126
 //        var_dump($stdBody->results);
127 127
 
128
-        if ($response->getStatusCode() == 200 && count($stdBody->results) == 1){
128
+        if ($response->getStatusCode() == 200 && count($stdBody->results) == 1) {
129 129
 
130
-            $id = (string)$stdBody->results[0]->id;
130
+            $id = (string) $stdBody->results[0]->id;
131 131
 
132 132
             return $id;
133 133
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                         var_dump('3');
67 67
 
68 68
                         $this->client->send($request);
69
-                    }catch(\Exception $e){
69
+                    } catch(\Exception $e){
70 70
                         var_dump($e->getMessage());
71 71
                     }
72 72
                 }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
             }
77 77
 //            var_dump($response->);
78
-        }catch(ClientException $e){
78
+        } catch(ClientException $e){
79 79
 
80 80
             echo 'ERROR!';
81 81
             var_dump($e->getMessage());
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             var_dump('try');
108 108
 //var_dump($request);die;
109 109
             $response = $this->client->send($request);
110
-        }catch(\Exception $e){
110
+        } catch(\Exception $e){
111 111
             var_dump('EEEEEEEEEEEEEEEERRRROOOOOOOOOOOOR');
112 112
             var_dump($e->getMessage());
113 113
             die;
Please login to merge, or discard this patch.