@@ -4,40 +4,40 @@ |
||
4 | 4 | |
5 | 5 | interface HttpInterface |
6 | 6 | { |
7 | - /** |
|
8 | - * @param $uri |
|
9 | - * @param array $params |
|
10 | - * @param array $headers |
|
11 | - * @return array |
|
12 | - */ |
|
13 | - public function get($uri, $params = [], $headers = []); |
|
7 | + /** |
|
8 | + * @param $uri |
|
9 | + * @param array $params |
|
10 | + * @param array $headers |
|
11 | + * @return array |
|
12 | + */ |
|
13 | + public function get($uri, $params = [], $headers = []); |
|
14 | 14 | |
15 | - /** |
|
16 | - * @param string $uri |
|
17 | - * @param array $body |
|
18 | - * @param array $headers |
|
19 | - * @return array |
|
20 | - */ |
|
21 | - public function post($uri, $body = [], $headers = []); |
|
15 | + /** |
|
16 | + * @param string $uri |
|
17 | + * @param array $body |
|
18 | + * @param array $headers |
|
19 | + * @return array |
|
20 | + */ |
|
21 | + public function post($uri, $body = [], $headers = []); |
|
22 | 22 | |
23 | - /** |
|
24 | - * @param string $uri |
|
25 | - * @param array $body |
|
26 | - * @param array $headers |
|
27 | - * @return mixed |
|
28 | - */ |
|
29 | - public function put($uri, $body = [], $headers = []); |
|
23 | + /** |
|
24 | + * @param string $uri |
|
25 | + * @param array $body |
|
26 | + * @param array $headers |
|
27 | + * @return mixed |
|
28 | + */ |
|
29 | + public function put($uri, $body = [], $headers = []); |
|
30 | 30 | |
31 | - /** |
|
32 | - * @param string $uri |
|
33 | - * @param array $headers |
|
34 | - * @return mixed |
|
35 | - */ |
|
36 | - public function delete($uri, $headers = []); |
|
31 | + /** |
|
32 | + * @param string $uri |
|
33 | + * @param array $headers |
|
34 | + * @return mixed |
|
35 | + */ |
|
36 | + public function delete($uri, $headers = []); |
|
37 | 37 | |
38 | - /** |
|
39 | - * @param string $url |
|
40 | - * @return $this |
|
41 | - */ |
|
42 | - public function setBaseUrl($url); |
|
38 | + /** |
|
39 | + * @param string $url |
|
40 | + * @return $this |
|
41 | + */ |
|
42 | + public function setBaseUrl($url); |
|
43 | 43 | } |
44 | 44 | \ No newline at end of file |
@@ -9,36 +9,36 @@ |
||
9 | 9 | |
10 | 10 | class Favro |
11 | 11 | { |
12 | - /** |
|
13 | - * @param string $login |
|
14 | - * @param string $password |
|
15 | - * @return Api |
|
16 | - */ |
|
17 | - public static function create($login, $password) |
|
18 | - { |
|
19 | - $endpointsContainer = new EndpointsContainer( |
|
20 | - self::getHttpInterfaceAdapter($login, $password) |
|
21 | - ); |
|
22 | - return new Api($endpointsContainer); |
|
23 | - } |
|
12 | + /** |
|
13 | + * @param string $login |
|
14 | + * @param string $password |
|
15 | + * @return Api |
|
16 | + */ |
|
17 | + public static function create($login, $password) |
|
18 | + { |
|
19 | + $endpointsContainer = new EndpointsContainer( |
|
20 | + self::getHttpInterfaceAdapter($login, $password) |
|
21 | + ); |
|
22 | + return new Api($endpointsContainer); |
|
23 | + } |
|
24 | 24 | |
25 | - /** |
|
26 | - * @param string $login |
|
27 | - * @param string $password |
|
28 | - * @return GuzzleHttpAdapter |
|
29 | - */ |
|
30 | - protected static function getHttpInterfaceAdapter($login, $password) |
|
31 | - { |
|
32 | - return new GuzzleHttpAdapter( |
|
33 | - new Client(['auth' => [$login, $password]]) |
|
34 | - ); |
|
35 | - } |
|
25 | + /** |
|
26 | + * @param string $login |
|
27 | + * @param string $password |
|
28 | + * @return GuzzleHttpAdapter |
|
29 | + */ |
|
30 | + protected static function getHttpInterfaceAdapter($login, $password) |
|
31 | + { |
|
32 | + return new GuzzleHttpAdapter( |
|
33 | + new Client(['auth' => [$login, $password]]) |
|
34 | + ); |
|
35 | + } |
|
36 | 36 | |
37 | - private function __construct() |
|
38 | - { |
|
39 | - } |
|
37 | + private function __construct() |
|
38 | + { |
|
39 | + } |
|
40 | 40 | |
41 | - private function __clone() |
|
42 | - { |
|
43 | - } |
|
41 | + private function __clone() |
|
42 | + { |
|
43 | + } |
|
44 | 44 | } |
45 | 45 | \ No newline at end of file |
@@ -6,10 +6,10 @@ |
||
6 | 6 | |
7 | 7 | class Users extends Endpoint |
8 | 8 | { |
9 | - use BelongsToOrganization; |
|
9 | + use BelongsToOrganization; |
|
10 | 10 | |
11 | - /** |
|
12 | - * @var string |
|
13 | - */ |
|
14 | - protected $endpoint = 'users'; |
|
11 | + /** |
|
12 | + * @var string |
|
13 | + */ |
|
14 | + protected $endpoint = 'users'; |
|
15 | 15 | } |
16 | 16 | \ No newline at end of file |
@@ -9,10 +9,10 @@ |
||
9 | 9 | class Columns extends Endpoint |
10 | 10 | { |
11 | 11 | |
12 | - use BelongsToOrganization, BelongsToWidget, CrudEndpoint; |
|
12 | + use BelongsToOrganization, BelongsToWidget, CrudEndpoint; |
|
13 | 13 | |
14 | - /** |
|
15 | - * @var string |
|
16 | - */ |
|
17 | - protected $endpoint = 'columns'; |
|
14 | + /** |
|
15 | + * @var string |
|
16 | + */ |
|
17 | + protected $endpoint = 'columns'; |
|
18 | 18 | } |
19 | 19 | \ No newline at end of file |
@@ -9,10 +9,10 @@ |
||
9 | 9 | class TaskLists extends Endpoint |
10 | 10 | { |
11 | 11 | |
12 | - use CrudEndpoint, BelongsToOrganization, BelongsToCard; |
|
12 | + use CrudEndpoint, BelongsToOrganization, BelongsToCard; |
|
13 | 13 | |
14 | - /** |
|
15 | - * @var string |
|
16 | - */ |
|
17 | - protected $endpoint = 'tasklists'; |
|
14 | + /** |
|
15 | + * @var string |
|
16 | + */ |
|
17 | + protected $endpoint = 'tasklists'; |
|
18 | 18 | } |
19 | 19 | \ No newline at end of file |
@@ -9,10 +9,10 @@ |
||
9 | 9 | class Cards extends Endpoint |
10 | 10 | { |
11 | 11 | |
12 | - use BelongsToOrganization, BelongsToWidget, CrudEndpoint; |
|
12 | + use BelongsToOrganization, BelongsToWidget, CrudEndpoint; |
|
13 | 13 | |
14 | - /** |
|
15 | - * @var string |
|
16 | - */ |
|
17 | - protected $endpoint = 'cards'; |
|
14 | + /** |
|
15 | + * @var string |
|
16 | + */ |
|
17 | + protected $endpoint = 'cards'; |
|
18 | 18 | } |
19 | 19 | \ No newline at end of file |
@@ -8,10 +8,10 @@ |
||
8 | 8 | class Tags extends Endpoint |
9 | 9 | { |
10 | 10 | |
11 | - use CrudEndpoint, BelongsToOrganization; |
|
11 | + use CrudEndpoint, BelongsToOrganization; |
|
12 | 12 | |
13 | - /** |
|
14 | - * @var string |
|
15 | - */ |
|
16 | - protected $endpoint = 'tags'; |
|
13 | + /** |
|
14 | + * @var string |
|
15 | + */ |
|
16 | + protected $endpoint = 'tags'; |
|
17 | 17 | } |
18 | 18 | \ No newline at end of file |
@@ -9,10 +9,10 @@ |
||
9 | 9 | class Comments extends Endpoint |
10 | 10 | { |
11 | 11 | |
12 | - use CrudEndpoint, BelongsToOrganization, BelongsToCard; |
|
12 | + use CrudEndpoint, BelongsToOrganization, BelongsToCard; |
|
13 | 13 | |
14 | - /** |
|
15 | - * @var string |
|
16 | - */ |
|
17 | - protected $endpoint = 'comments'; |
|
14 | + /** |
|
15 | + * @var string |
|
16 | + */ |
|
17 | + protected $endpoint = 'comments'; |
|
18 | 18 | } |
19 | 19 | \ No newline at end of file |
@@ -9,10 +9,10 @@ |
||
9 | 9 | class Tasks extends Endpoint |
10 | 10 | { |
11 | 11 | |
12 | - use BelongsToOrganization, BelongsToCard, CrudEndpoint; |
|
12 | + use BelongsToOrganization, BelongsToCard, CrudEndpoint; |
|
13 | 13 | |
14 | - /** |
|
15 | - * @var string |
|
16 | - */ |
|
17 | - protected $endpoint = 'tasks'; |
|
14 | + /** |
|
15 | + * @var string |
|
16 | + */ |
|
17 | + protected $endpoint = 'tasks'; |
|
18 | 18 | } |
19 | 19 | \ No newline at end of file |