@@ -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 |
@@ -8,10 +8,10 @@ |
||
| 8 | 8 | class Widgets extends Endpoint |
| 9 | 9 | { |
| 10 | 10 | |
| 11 | - use BelongsToOrganization, CrudEndpoint; |
|
| 11 | + use BelongsToOrganization, CrudEndpoint; |
|
| 12 | 12 | |
| 13 | - /** |
|
| 14 | - * @var string |
|
| 15 | - */ |
|
| 16 | - protected $endpoint = 'widgets'; |
|
| 13 | + /** |
|
| 14 | + * @var string |
|
| 15 | + */ |
|
| 16 | + protected $endpoint = 'widgets'; |
|
| 17 | 17 | } |
| 18 | 18 | \ No newline at end of file |
@@ -7,10 +7,10 @@ |
||
| 7 | 7 | |
| 8 | 8 | class Collections extends Endpoint |
| 9 | 9 | { |
| 10 | - use BelongsToOrganization, CrudEndpoint; |
|
| 10 | + use BelongsToOrganization, CrudEndpoint; |
|
| 11 | 11 | |
| 12 | - /** |
|
| 13 | - * @var string |
|
| 14 | - */ |
|
| 15 | - protected $endpoint = 'collections'; |
|
| 12 | + /** |
|
| 13 | + * @var string |
|
| 14 | + */ |
|
| 15 | + protected $endpoint = 'collections'; |
|
| 16 | 16 | } |
| 17 | 17 | \ No newline at end of file |
@@ -25,55 +25,55 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | class Api |
| 27 | 27 | { |
| 28 | - /** |
|
| 29 | - * @var EndpointsContainer |
|
| 30 | - */ |
|
| 31 | - protected $endpointsContainer; |
|
| 28 | + /** |
|
| 29 | + * @var EndpointsContainer |
|
| 30 | + */ |
|
| 31 | + protected $endpointsContainer; |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * @var string |
|
| 35 | - */ |
|
| 36 | - protected $organizationId; |
|
| 33 | + /** |
|
| 34 | + * @var string |
|
| 35 | + */ |
|
| 36 | + protected $organizationId; |
|
| 37 | 37 | |
| 38 | - public function __construct(EndpointsContainer $endpointsContainer) |
|
| 39 | - { |
|
| 40 | - $this->endpointsContainer = $endpointsContainer; |
|
| 41 | - } |
|
| 38 | + public function __construct(EndpointsContainer $endpointsContainer) |
|
| 39 | + { |
|
| 40 | + $this->endpointsContainer = $endpointsContainer; |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * Magic method to access different endpoints. |
|
| 45 | - * |
|
| 46 | - * @param string $endpoint |
|
| 47 | - * |
|
| 48 | - * @return Endpoint |
|
| 49 | - */ |
|
| 50 | - public function __get($endpoint) |
|
| 51 | - { |
|
| 52 | - $endpoint = $this->endpointsContainer->resolveEndpoint($endpoint); |
|
| 43 | + /** |
|
| 44 | + * Magic method to access different endpoints. |
|
| 45 | + * |
|
| 46 | + * @param string $endpoint |
|
| 47 | + * |
|
| 48 | + * @return Endpoint |
|
| 49 | + */ |
|
| 50 | + public function __get($endpoint) |
|
| 51 | + { |
|
| 52 | + $endpoint = $this->endpointsContainer->resolveEndpoint($endpoint); |
|
| 53 | 53 | |
| 54 | - if (method_exists($endpoint, 'setOrganizationId')) { |
|
| 55 | - $endpoint->setOrganizationId($this->organizationId); |
|
| 56 | - } |
|
| 54 | + if (method_exists($endpoint, 'setOrganizationId')) { |
|
| 55 | + $endpoint->setOrganizationId($this->organizationId); |
|
| 56 | + } |
|
| 57 | 57 | |
| 58 | - return $endpoint; |
|
| 59 | - } |
|
| 58 | + return $endpoint; |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | - /** |
|
| 62 | - * @param int $organizationId |
|
| 63 | - * @return $this |
|
| 64 | - */ |
|
| 65 | - public function setOrganization($organizationId) |
|
| 66 | - { |
|
| 67 | - $this->organizationId = $organizationId; |
|
| 61 | + /** |
|
| 62 | + * @param int $organizationId |
|
| 63 | + * @return $this |
|
| 64 | + */ |
|
| 65 | + public function setOrganization($organizationId) |
|
| 66 | + { |
|
| 67 | + $this->organizationId = $organizationId; |
|
| 68 | 68 | |
| 69 | - return $this; |
|
| 70 | - } |
|
| 69 | + return $this; |
|
| 70 | + } |
|
| 71 | 71 | |
| 72 | - /** |
|
| 73 | - * @return string |
|
| 74 | - */ |
|
| 75 | - public function getOrganizationId() |
|
| 76 | - { |
|
| 77 | - return $this->organizationId; |
|
| 78 | - } |
|
| 72 | + /** |
|
| 73 | + * @return string |
|
| 74 | + */ |
|
| 75 | + public function getOrganizationId() |
|
| 76 | + { |
|
| 77 | + return $this->organizationId; |
|
| 78 | + } |
|
| 79 | 79 | } |
| 80 | 80 | \ No newline at end of file |