@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | class Results extends AbstractApi |
13 | 13 | { |
14 | - public function create(int $runId, int $caseId, int $statusId, array $parameters = []){ |
|
14 | + public function create(int $runId, int $caseId, int $statusId, array $parameters = []) { |
|
15 | 15 | $parameters['status_id'] = $statusId; |
16 | 16 | $result = $this->connector->send_post('add_result_for_case/'.$this->encodePath($runId).'/'.$this->encodePath($caseId), |
17 | 17 | $parameters); |
@@ -14,15 +14,15 @@ discard block |
||
14 | 14 | private $cache = []; |
15 | 15 | public function all(int $projectId) |
16 | 16 | { |
17 | - if(!isset($this->cache[$projectId])) { |
|
18 | - $this->cache[$projectId] = $this->connector->send_get('get_plans/' . $this->encodePath($projectId)); |
|
17 | + if (!isset($this->cache[$projectId])) { |
|
18 | + $this->cache[$projectId] = $this->connector->send_get('get_plans/'.$this->encodePath($projectId)); |
|
19 | 19 | } |
20 | 20 | return $this->cache[$projectId]; |
21 | 21 | } |
22 | 22 | |
23 | 23 | public function get(int $planId) |
24 | 24 | { |
25 | - return $this->connector->send_get('get_plan/' . $this->encodePath($planId)); |
|
25 | + return $this->connector->send_get('get_plan/'.$this->encodePath($planId)); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | public function findByName(int $projectId, string $name) |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | return $plan; |
47 | 47 | } |
48 | 48 | |
49 | - public function createEntry(int $planId, int $suiteId, string $name, array $configIds = [], array $runs = [], string $description = null, bool $all = true, array $cases = [], int $assignedTo = null){ |
|
49 | + public function createEntry(int $planId, int $suiteId, string $name, array $configIds = [], array $runs = [], string $description = null, bool $all = true, array $cases = [], int $assignedTo = null) { |
|
50 | 50 | $entry = $this->connector->send_post('add_plan_entry/'.$this->encodePath($planId), |
51 | - ['suite_id' => $suiteId,'name' => $name, 'description' => $description, 'include_all' => $all, 'case_ids' => $cases, 'config_ids' => $configIds, 'runs' => $runs,'assignedto_id' => $assignedTo]); |
|
51 | + ['suite_id' => $suiteId, 'name' => $name, 'description' => $description, 'include_all' => $all, 'case_ids' => $cases, 'config_ids' => $configIds, 'runs' => $runs, 'assignedto_id' => $assignedTo]); |
|
52 | 52 | $this->cache = []; |
53 | 53 | return $entry; |
54 | 54 | } |
@@ -61,30 +61,30 @@ discard block |
||
61 | 61 | * @var int $milestone_id |
62 | 62 | * } |
63 | 63 | */ |
64 | - public function update(int $planId, array $parameters = []){ |
|
65 | - $plan = $this->connector->send_post('update_plan/'.$this->encodePath($planId),$parameters); |
|
64 | + public function update(int $planId, array $parameters = []) { |
|
65 | + $plan = $this->connector->send_post('update_plan/'.$this->encodePath($planId), $parameters); |
|
66 | 66 | $this->cache = []; |
67 | 67 | return $plan; |
68 | 68 | } |
69 | 69 | |
70 | - public function updateEntry(int $planId, int $entryId, array $parameters = []){ |
|
71 | - $entry = $this->connector->send_post('update_plan_entry/'.$this->encodePath($planId).'/'.$this->encodePath($entryId),$parameters); |
|
70 | + public function updateEntry(int $planId, int $entryId, array $parameters = []) { |
|
71 | + $entry = $this->connector->send_post('update_plan_entry/'.$this->encodePath($planId).'/'.$this->encodePath($entryId), $parameters); |
|
72 | 72 | $this->cache = []; |
73 | 73 | return $entry; |
74 | 74 | } |
75 | 75 | |
76 | - public function delete(int $planId){ |
|
77 | - $this->connector->send_post('delete_plan/'.$this->encodePath($planId),[]); |
|
76 | + public function delete(int $planId) { |
|
77 | + $this->connector->send_post('delete_plan/'.$this->encodePath($planId), []); |
|
78 | 78 | $this->cache = []; |
79 | 79 | } |
80 | 80 | |
81 | - public function deleteEntry(int $planId, int $entryId){ |
|
82 | - $this->connector->send_post('delete_plan_entry/'.$this->encodePath($planId).'/'.$this->encodePath($entryId),[]); |
|
81 | + public function deleteEntry(int $planId, int $entryId) { |
|
82 | + $this->connector->send_post('delete_plan_entry/'.$this->encodePath($planId).'/'.$this->encodePath($entryId), []); |
|
83 | 83 | $this->cache = []; |
84 | 84 | } |
85 | 85 | |
86 | - public function close(int $planId){ |
|
87 | - $plan = $this->connector->send_post('close_plan/'.$this->encodePath($planId),[]); |
|
86 | + public function close(int $planId) { |
|
87 | + $plan = $this->connector->send_post('close_plan/'.$this->encodePath($planId), []); |
|
88 | 88 | $this->cache = []; |
89 | 89 | return $plan; |
90 | 90 | } |
@@ -14,13 +14,13 @@ discard block |
||
14 | 14 | private $cache = []; |
15 | 15 | public function all(int $projectId) |
16 | 16 | { |
17 | - if(!isset($this->cache[$projectId])) { |
|
18 | - $this->cache[$projectId] = $this->connector->send_get('get_configs/' . $this->encodePath($projectId)); |
|
17 | + if (!isset($this->cache[$projectId])) { |
|
18 | + $this->cache[$projectId] = $this->connector->send_get('get_configs/'.$this->encodePath($projectId)); |
|
19 | 19 | } |
20 | 20 | return $this->cache[$projectId]; |
21 | 21 | } |
22 | 22 | |
23 | - public function findByGroupName(int $projectId, string $name){ |
|
23 | + public function findByGroupName(int $projectId, string $name) { |
|
24 | 24 | $configurations = $this->all($projectId); |
25 | 25 | foreach ($configurations as $configuration) { |
26 | 26 | if ($configuration['name'] === $name) { |
@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | return []; |
31 | 31 | } |
32 | 32 | |
33 | - public function findByName(int $projectId, string $fieldName, string $name){ |
|
33 | + public function findByName(int $projectId, string $fieldName, string $name) { |
|
34 | 34 | $configurations = $this->all($projectId); |
35 | 35 | foreach ($configurations as $configuration) { |
36 | - if($configuration['name'] == $fieldName) { |
|
36 | + if ($configuration['name'] == $fieldName) { |
|
37 | 37 | foreach ($configuration['configs'] as $config) { |
38 | 38 | if ($config['name'] === $name) { |
39 | 39 | return $config; |
@@ -52,14 +52,14 @@ discard block |
||
52 | 52 | return $group; |
53 | 53 | } |
54 | 54 | |
55 | - public function updateGroup(int $groupId, string $name){ |
|
56 | - $group = $this->connector->send_post('update_config_group/'.$this->encodePath($groupId),['name' => $name]); |
|
55 | + public function updateGroup(int $groupId, string $name) { |
|
56 | + $group = $this->connector->send_post('update_config_group/'.$this->encodePath($groupId), ['name' => $name]); |
|
57 | 57 | $this->cache = []; |
58 | 58 | return $group; |
59 | 59 | } |
60 | 60 | |
61 | - public function deleteGroup(int $groupId){ |
|
62 | - $this->connector->send_post('delete_config_group/'.$this->encodePath($groupId),[]); |
|
61 | + public function deleteGroup(int $groupId) { |
|
62 | + $this->connector->send_post('delete_config_group/'.$this->encodePath($groupId), []); |
|
63 | 63 | $this->cache = []; |
64 | 64 | } |
65 | 65 | |
@@ -71,14 +71,14 @@ discard block |
||
71 | 71 | return $config; |
72 | 72 | } |
73 | 73 | |
74 | - public function update(int $configId, string $name){ |
|
74 | + public function update(int $configId, string $name) { |
|
75 | 75 | $this->connector->send_post('update_config/'.$this->encodePath($configId), |
76 | 76 | ['name' => $name]); |
77 | 77 | $this->cache = []; |
78 | 78 | } |
79 | 79 | |
80 | - public function delete(int $configId){ |
|
81 | - $this->connector->send_post('delete_config/'.$this->encodePath($configId),[]); |
|
80 | + public function delete(int $configId) { |
|
81 | + $this->connector->send_post('delete_config/'.$this->encodePath($configId), []); |
|
82 | 82 | $this->cache = []; |
83 | 83 | } |
84 | 84 | } |
85 | 85 | \ No newline at end of file |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | private $cache = null; |
15 | 15 | public function all() |
16 | 16 | { |
17 | - if($this->cache === null) { |
|
17 | + if ($this->cache === null) { |
|
18 | 18 | $this->cache = $this->connector->send_get('get_priorities'); |
19 | 19 | } |
20 | 20 | return $this->cache; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | return []; |
32 | 32 | } |
33 | 33 | |
34 | - public function getDefaultPriority(){ |
|
34 | + public function getDefaultPriority() { |
|
35 | 35 | $priorities = $this->all(); |
36 | 36 | foreach ($priorities as $priority) { |
37 | 37 | if ($priority['is_default'] === true) { |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | public function all() |
20 | 20 | { |
21 | - if($this->cache === null) { |
|
21 | + if ($this->cache === null) { |
|
22 | 22 | $this->cache = $this->connector->send_get('get_projects'); |
23 | 23 | } |
24 | 24 | return $this->cache; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | public function get(int $projectId) |
28 | 28 | { |
29 | - return $this->connector->send_get('get_project/' . $this->encodePath($projectId)); |
|
29 | + return $this->connector->send_get('get_project/'.$this->encodePath($projectId)); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | public function findByName(string $name) |
@@ -61,14 +61,14 @@ discard block |
||
61 | 61 | * @var bool $is_completed |
62 | 62 | * } |
63 | 63 | */ |
64 | - public function update(int $projectId, array $parameters = []){ |
|
65 | - $project = $this->connector->send_post('update_project/'.$this->encodePath($projectId),$parameters); |
|
64 | + public function update(int $projectId, array $parameters = []) { |
|
65 | + $project = $this->connector->send_post('update_project/'.$this->encodePath($projectId), $parameters); |
|
66 | 66 | $this->cache = null; |
67 | 67 | return $project; |
68 | 68 | } |
69 | 69 | |
70 | - public function delete(int $projectId){ |
|
71 | - $this->connector->send_post('delete_project/'.$this->encodePath($projectId),[]); |
|
70 | + public function delete(int $projectId) { |
|
71 | + $this->connector->send_post('delete_project/'.$this->encodePath($projectId), []); |
|
72 | 72 | $this->cache = null; |
73 | 73 | } |
74 | 74 | } |
75 | 75 | \ No newline at end of file |
@@ -14,8 +14,8 @@ |
||
14 | 14 | private $cache = null; |
15 | 15 | public function all() |
16 | 16 | { |
17 | - if($this->cache === null) { |
|
18 | - $this->cache = $this->connector->send_get('get_case_types'); |
|
17 | + if ($this->cache === null) { |
|
18 | + $this->cache = $this->connector->send_get('get_case_types'); |
|
19 | 19 | } |
20 | 20 | return $this->cache; |
21 | 21 | } |