@@ -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 |
@@ -6,21 +6,21 @@ |
||
| 6 | 6 | |
| 7 | 7 | class Organizations extends Endpoint |
| 8 | 8 | { |
| 9 | - use CrudEndpoint; |
|
| 9 | + use CrudEndpoint; |
|
| 10 | 10 | |
| 11 | - /** |
|
| 12 | - * @var string |
|
| 13 | - */ |
|
| 14 | - protected $endpoint = 'organizations'; |
|
| 11 | + /** |
|
| 12 | + * @var string |
|
| 13 | + */ |
|
| 14 | + protected $endpoint = 'organizations'; |
|
| 15 | 15 | |
| 16 | - /** |
|
| 17 | - * @param string $id |
|
| 18 | - * @return array |
|
| 19 | - */ |
|
| 20 | - public function getById($id) |
|
| 21 | - { |
|
| 22 | - $this->headers['organizationId'] = $id; |
|
| 16 | + /** |
|
| 17 | + * @param string $id |
|
| 18 | + * @return array |
|
| 19 | + */ |
|
| 20 | + public function getById($id) |
|
| 21 | + { |
|
| 22 | + $this->headers['organizationId'] = $id; |
|
| 23 | 23 | |
| 24 | - return parent::getById($id); |
|
| 25 | - } |
|
| 24 | + return parent::getById($id); |
|
| 25 | + } |
|
| 26 | 26 | } |
| 27 | 27 | \ No newline at end of file |