@@ -7,18 +7,18 @@ discard block |
||
| 7 | 7 | */ |
| 8 | 8 | class PriorityService extends \JiraRestApi\JiraClient |
| 9 | 9 | { |
| 10 | - private $uri = '/priority'; |
|
| 11 | - |
|
| 12 | - /** |
|
| 13 | - * Function to get all priorities. |
|
| 14 | - * |
|
| 15 | - * @throws \JiraRestApi\JiraException |
|
| 16 | - * @throws \JsonMapper_Exception |
|
| 17 | - * |
|
| 18 | - * @return Priority|object Priority class |
|
| 19 | - */ |
|
| 20 | - public function getAll() |
|
| 21 | - { |
|
| 10 | + private $uri = '/priority'; |
|
| 11 | + |
|
| 12 | + /** |
|
| 13 | + * Function to get all priorities. |
|
| 14 | + * |
|
| 15 | + * @throws \JiraRestApi\JiraException |
|
| 16 | + * @throws \JsonMapper_Exception |
|
| 17 | + * |
|
| 18 | + * @return Priority|object Priority class |
|
| 19 | + */ |
|
| 20 | + public function getAll() |
|
| 21 | + { |
|
| 22 | 22 | $queryParam = '?'.http_build_query(); |
| 23 | 23 | |
| 24 | 24 | $ret = $this->exec($this->uri, null); |
@@ -29,12 +29,12 @@ discard block |
||
| 29 | 29 | $priorities = []; |
| 30 | 30 | |
| 31 | 31 | foreach ($priorityData as $priority) { |
| 32 | - $priorities[] = $this->json_mapper->map( |
|
| 32 | + $priorities[] = $this->json_mapper->map( |
|
| 33 | 33 | $priority, new Priority() |
| 34 | - ); |
|
| 34 | + ); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | return $priorities; |
| 38 | - } |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | 40 | } |
@@ -9,54 +9,54 @@ |
||
| 9 | 9 | */ |
| 10 | 10 | class Priority implements \JsonSerializable |
| 11 | 11 | { |
| 12 | - use ClassSerialize; |
|
| 13 | - |
|
| 14 | - /** |
|
| 15 | - * uri which was hit. |
|
| 16 | - * |
|
| 17 | - * @var string |
|
| 18 | - */ |
|
| 19 | - public $self; |
|
| 20 | - |
|
| 21 | - /** |
|
| 22 | - * @var string |
|
| 23 | - */ |
|
| 24 | - public $statusColor; |
|
| 25 | - |
|
| 26 | - /** |
|
| 27 | - * @var string |
|
| 28 | - */ |
|
| 29 | - public $description; |
|
| 30 | - |
|
| 31 | - /** |
|
| 32 | - * @var string |
|
| 33 | - */ |
|
| 34 | - public $iconUrl; |
|
| 35 | - |
|
| 36 | - /** |
|
| 37 | - * @var string |
|
| 38 | - */ |
|
| 39 | - public $name; |
|
| 40 | - |
|
| 41 | - /** |
|
| 42 | - * @var string |
|
| 43 | - */ |
|
| 44 | - public $id; |
|
| 45 | - |
|
| 46 | - public function jsonSerialize() |
|
| 47 | - { |
|
| 12 | + use ClassSerialize; |
|
| 13 | + |
|
| 14 | + /** |
|
| 15 | + * uri which was hit. |
|
| 16 | + * |
|
| 17 | + * @var string |
|
| 18 | + */ |
|
| 19 | + public $self; |
|
| 20 | + |
|
| 21 | + /** |
|
| 22 | + * @var string |
|
| 23 | + */ |
|
| 24 | + public $statusColor; |
|
| 25 | + |
|
| 26 | + /** |
|
| 27 | + * @var string |
|
| 28 | + */ |
|
| 29 | + public $description; |
|
| 30 | + |
|
| 31 | + /** |
|
| 32 | + * @var string |
|
| 33 | + */ |
|
| 34 | + public $iconUrl; |
|
| 35 | + |
|
| 36 | + /** |
|
| 37 | + * @var string |
|
| 38 | + */ |
|
| 39 | + public $name; |
|
| 40 | + |
|
| 41 | + /** |
|
| 42 | + * @var string |
|
| 43 | + */ |
|
| 44 | + public $id; |
|
| 45 | + |
|
| 46 | + public function jsonSerialize() |
|
| 47 | + { |
|
| 48 | 48 | return array_filter(get_object_vars($this)); |
| 49 | - } |
|
| 50 | - |
|
| 51 | - /** |
|
| 52 | - * Priority constructor. |
|
| 53 | - * |
|
| 54 | - * @param array $array priority info array. |
|
| 55 | - */ |
|
| 56 | - public function __construct($array = []) |
|
| 57 | - { |
|
| 49 | + } |
|
| 50 | + |
|
| 51 | + /** |
|
| 52 | + * Priority constructor. |
|
| 53 | + * |
|
| 54 | + * @param array $array priority info array. |
|
| 55 | + */ |
|
| 56 | + public function __construct($array = []) |
|
| 57 | + { |
|
| 58 | 58 | foreach ($array as $key=>$value) { |
| 59 | - $this->{$key} = $value; |
|
| 59 | + $this->{$key} = $value; |
|
| 60 | + } |
|
| 60 | 61 | } |
| 61 | - } |
|
| 62 | 62 | } |