|
2 | 2 |
|
3 | 3 | namespace JiraRestApi\Issue; |
4 | 4 |
|
5 | | -use JiraRestApi\Dumper; |
6 | 5 | use JiraRestApi\JiraException; |
7 | 6 |
|
8 | 7 | class IssueService extends \JiraRestApi\JiraClient |
@@ -935,32 +934,32 @@ public function getIssueSecuritySchemes($securityId) |
935 | 934 | * @param string|int $issueIdOrKey |
936 | 935 | * @param array|null $addLablesParam |
937 | 936 | * @param array|null $removeLabelsParam |
938 | | - * @param bool $notifyUsers |
939 | | - * |
940 | | - * @return Issue|object class |
| 937 | + * @param bool $notifyUsers |
941 | 938 | * |
942 | 939 | * @throws JiraException |
| 940 | + * |
| 941 | + * @return Issue|object class |
943 | 942 | */ |
944 | 943 | public function updateLabels($issueIdOrKey, $addLablesParam, $removeLabelsParam, $notifyUsers = true) |
945 | 944 | { |
946 | 945 | $labels = []; |
947 | | - foreach($addLablesParam as $a) { |
948 | | - array_push($labels, ["add" => $a]); |
| 946 | + foreach ($addLablesParam as $a) { |
| 947 | + array_push($labels, ['add' => $a]); |
949 | 948 | } |
950 | 949 |
|
951 | | - foreach($removeLabelsParam as $r) { |
952 | | - array_push($labels, ["remove" => $r]); |
| 950 | + foreach ($removeLabelsParam as $r) { |
| 951 | + array_push($labels, ['remove' => $r]); |
953 | 952 | } |
954 | 953 |
|
955 | 954 | $postData = json_encode([ |
956 | | - "update" => [ |
957 | | - "labels" => $labels |
958 | | - ] |
959 | | - ], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT ); |
| 955 | + 'update' => [ |
| 956 | + 'labels' => $labels, |
| 957 | + ], |
| 958 | + ], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); |
960 | 959 |
|
961 | 960 | $this->log->addInfo("Update labels=\n".$postData); |
962 | 961 |
|
963 | | - $queryParam = '?'.http_build_query(["notifyUsers" => $notifyUsers]); |
| 962 | + $queryParam = '?'.http_build_query(['notifyUsers' => $notifyUsers]); |
964 | 963 |
|
965 | 964 | $ret = $this->exec($this->uri."/$issueIdOrKey".$queryParam, $postData, 'PUT'); |
966 | 965 |
|
|
0 commit comments