1 | <?php |
||
17 | class Confluence |
||
18 | { |
||
19 | const ADD_PAGE = 'rest/api/content'; |
||
|
|||
20 | const SEARCH_PAGE = 'rest/api/content/search'; |
||
21 | |||
22 | /** |
||
23 | * @var \GuzzleHttp\ClientInterface |
||
24 | */ |
||
25 | private $client; |
||
26 | /** |
||
27 | * @var \CodeMine\ConfluenceImporter\Service\Confluence\InstanceInterface |
||
28 | */ |
||
29 | private $confluenceInstance; |
||
30 | |||
31 | /** |
||
32 | * Confluence constructor. |
||
33 | * |
||
34 | * blabdlabsdaldbalsbdals |
||
35 | * aldnalsdlasdn |
||
36 | * alndlasndsdijfpgaijfawl |
||
37 | * |
||
38 | * @param \GuzzleHttp\ClientInterface $client |
||
39 | * @param \CodeMine\ConfluenceImporter\Service\Confluence\InstanceInterface $confluenceInstance |
||
40 | */ |
||
41 | public function __construct(ClientInterface $client, InstanceInterface $confluenceInstance) |
||
46 | |||
47 | /** |
||
48 | * @param $key |
||
49 | * @param PageInterface $page |
||
50 | * @param PageInterface|NULL $parentPage |
||
51 | * @param null $id |
||
52 | * |
||
53 | * @docblock bla bla bla bla bla bla bla |
||
54 | */ |
||
55 | public function createNewPage($key, PageInterface $page, PageInterface $parentPage = NULL, $id = NULL) |
||
76 | |||
77 | public function getPageId($key, PageInterface $page) //TODO::Change for private method |
||
110 | |||
111 | /** |
||
112 | * @return string |
||
113 | */ |
||
114 | private function getBase64Credentials() |
||
124 | |||
125 | /** |
||
126 | * @return array |
||
127 | */ |
||
128 | private function getHeaders() |
||
137 | |||
138 | /** |
||
139 | * @param string $key |
||
140 | * @param PageInterface $page |
||
141 | * @param PageInterface|NULL $parentPage |
||
142 | * @return string<json> |
||
143 | * @throws \Exception |
||
144 | */ |
||
145 | private function getBody($key, PageInterface $page, PageInterface $parentPage = NULL, $id = NULL) |
||
178 | |||
179 | /** |
||
180 | * @param $headers |
||
181 | * @param $body |
||
182 | * @return Request |
||
183 | */ |
||
184 | private function getRequest($headers, $body) |
||
191 | } |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.