@@ -74,6 +74,9 @@ discard block |
||
74 | 74 | } |
75 | 75 | } |
76 | 76 | |
77 | + /** |
|
78 | + * @param string $key |
|
79 | + */ |
|
77 | 80 | public function getPageId($key, PageInterface $page) //TODO::Change for private method |
78 | 81 | { |
79 | 82 | $headers = [ |
@@ -178,7 +181,7 @@ discard block |
||
178 | 181 | |
179 | 182 | /** |
180 | 183 | * @param $headers |
181 | - * @param $body |
|
184 | + * @param string $body |
|
182 | 185 | * @return Request |
183 | 186 | */ |
184 | 187 | private function getRequest($headers, $body) |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | $stdBody = json_decode($returnBody->getContents()); |
102 | 102 | if ($response->getStatusCode() == 200 && count($stdBody->results) == 1) { |
103 | - $id = (string)$stdBody->results[0]->id; |
|
103 | + $id = (string) $stdBody->results[0]->id; |
|
104 | 104 | |
105 | 105 | return $id; |
106 | 106 | |
@@ -159,11 +159,11 @@ discard block |
||
159 | 159 | ]; |
160 | 160 | |
161 | 161 | if (isset($parentPage)) { |
162 | - if (isset($id)){ |
|
162 | + if (isset($id)) { |
|
163 | 163 | $bodyArray['ancestors'] = [ |
164 | 164 | ['id' => $id] |
165 | 165 | ]; |
166 | - }else { |
|
166 | + } else { |
|
167 | 167 | $pageId = $this->getPageId($key, $parentPage); |
168 | 168 | $bodyArray['ancestors'] = [ |
169 | 169 | ['id' => $pageId] |
@@ -163,7 +163,7 @@ |
||
163 | 163 | $bodyArray['ancestors'] = [ |
164 | 164 | ['id' => $id] |
165 | 165 | ]; |
166 | - }else { |
|
166 | + } else { |
|
167 | 167 | $pageId = $this->getPageId($key, $parentPage); |
168 | 168 | $bodyArray['ancestors'] = [ |
169 | 169 | ['id' => $pageId] |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Created by IntelliJ IDEA. |
|
4 | - * User: yoshi |
|
5 | - * Date: 27.01.16 |
|
6 | - * Time: 19:52 |
|
7 | - */ |
|
3 | + * Created by IntelliJ IDEA. |
|
4 | + * User: yoshi |
|
5 | + * Date: 27.01.16 |
|
6 | + * Time: 19:52 |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace CodeMine\ConfluenceImporter\Parser\File; |
10 | 10 |
@@ -46,19 +46,19 @@ discard block |
||
46 | 46 | { |
47 | 47 | $fileCollection = new \SplObjectStorage(); |
48 | 48 | |
49 | - foreach ($this->classArray as $class){ |
|
49 | + foreach ($this->classArray as $class) { |
|
50 | 50 | |
51 | 51 | $file = new File(); |
52 | 52 | |
53 | - if (isset($class['@attributes'])){ |
|
53 | + if (isset($class['@attributes'])) { |
|
54 | 54 | $path = $class['@attributes']['path']; |
55 | 55 | $package = $class['@attributes']['package']; |
56 | 56 | $file->setPath($path); |
57 | 57 | $file->setPackage($package); |
58 | 58 | } |
59 | 59 | |
60 | - foreach ($class as $key => $value){ |
|
61 | - switch($key){ |
|
60 | + foreach ($class as $key => $value) { |
|
61 | + switch ($key) { |
|
62 | 62 | case 'class': |
63 | 63 | $file->setType($key); |
64 | 64 | $file->setAbstract(strtolower($class['class']['@attributes']['abstract']) === 'true'); |
@@ -76,11 +76,11 @@ discard block |
||
76 | 76 | |
77 | 77 | } |
78 | 78 | |
79 | - if (isset($class['namespace-alias'])){ |
|
79 | + if (isset($class['namespace-alias'])) { |
|
80 | 80 | $file->setNamespaceAlias($class['namespace-alias']); |
81 | 81 | } |
82 | 82 | |
83 | - if (isset($class['constant'])){ |
|
83 | + if (isset($class['constant'])) { |
|
84 | 84 | $file->setConstant(); |
85 | 85 | } |
86 | 86 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | case 'interface': |
91 | 91 | $file->setType($key); |
92 | 92 | $file->setNamespace($class['interface']['@attributes']['namespace']); |
93 | - if (isset($class['namespace-alias'])){ |
|
93 | + if (isset($class['namespace-alias'])) { |
|
94 | 94 | $file->setNamespaceAlias($class['namespace-alias']); |
95 | 95 | } |
96 | 96 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | break; |
99 | 99 | case 'trait': |
100 | 100 | $file->setType($key); |
101 | - if (isset($class['namespace-alias'])){ |
|
101 | + if (isset($class['namespace-alias'])) { |
|
102 | 102 | $file->setNamespaceAlias($class['namespace-alias']); |
103 | 103 | } |
104 | 104 | echo $key . PHP_EOL; |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Created by IntelliJ IDEA. |
|
4 | - * User: yoshi |
|
5 | - * Date: 29.01.16 |
|
6 | - * Time: 15:37 |
|
7 | - */ |
|
3 | + * Created by IntelliJ IDEA. |
|
4 | + * User: yoshi |
|
5 | + * Date: 29.01.16 |
|
6 | + * Time: 15:37 |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace CodeMine\ConfluenceImporter\Parser\Structure\Attribute; |
10 | 10 |