44
55/**
66 * Class to perform all groups related queries.
7- * @package JiraRestApi\Group
87 */
98class GroupService extends \JiraRestApi \JiraClient
109{
@@ -14,7 +13,7 @@ class GroupService extends \JiraRestApi\JiraClient
1413 * Function to get group.
1514 *
1615 * @param array $paramArray Possible values for $paramArray 'username', 'key'.
17- * "Either the 'username' or the 'key' query parameters need to be provided".
16+ * "Either the 'username' or the 'key' query parameters need to be provided".
1817 *
1918 * @return Group class
2019 */
@@ -32,18 +31,20 @@ public function get($paramArray)
3231 }
3332
3433 /**
35- * Get users from group
34+ * Get users from group.
3635 *
3736 * @param $paramArray groupname, includeInactiveUsers, startAt, maxResults
38- * @return GroupSearchResult
37+ *
3938 * @throws \JiraRestApi\JiraException
4039 * @throws \JsonMapper_Exception
40+ *
41+ * @return GroupSearchResult
4142 */
4243 public function getMembers ($ paramArray )
4344 {
44- $ queryParam = '? ' . http_build_query ($ paramArray );
45+ $ queryParam = '? ' . http_build_query ($ paramArray );
4546
46- $ ret = $ this ->exec ($ this ->uri . '/member ' .$ queryParam , null );
47+ $ ret = $ this ->exec ($ this ->uri . '/member ' .$ queryParam , null );
4748
4849 $ this ->log ->addInfo ("Result= \n" .$ ret );
4950
@@ -55,12 +56,14 @@ public function getMembers($paramArray)
5556 }
5657
5758 /**
58- * Creates a group by given group parameter
59+ * Creates a group by given group parameter.
5960 *
6061 * @param $group \JiraRestApi\Group\Group
61- * @return array
62+ *
6263 * @throws \JiraRestApi\JiraException
6364 * @throws \JsonMapper_Exception
65+ *
66+ * @return array
6467 */
6568 public function createGroup ($ group )
6669 {
@@ -84,15 +87,17 @@ public function createGroup($group)
8487 * Adds given user to a group.
8588 *
8689 * @param $group
87- * @return Returns the current state of the group.
90+ *
8891 * @throws \JiraRestApi\JiraException
8992 * @throws \JsonMapper_Exception
93+ *
94+ * @return Returns the current state of the group.
9095 */
9196 public function addUserToGroup ($ groupName , $ userName )
9297 {
93- $ data = json_encode (['name ' => $ userName, ]);
98+ $ data = json_encode (['name ' => $ userName ]);
9499
95- $ ret = $ this ->exec ($ this ->uri . '/user?groupname= ' . urlencode ($ groupName ), $ data );
100+ $ ret = $ this ->exec ($ this ->uri . '/user?groupname= ' . urlencode ($ groupName ), $ data );
96101
97102 $ this ->log ->addInfo ("Result= \n" .$ ret );
98103
@@ -108,15 +113,17 @@ public function addUserToGroup($groupName, $userName)
108113 *
109114 * @param $groupName
110115 * @param $userName
111- * @return null Returns no content
116+ *
112117 * @throws \JiraRestApi\JiraException
113118 * @throws \JsonMapper_Exception
119+ *
120+ * @return null Returns no content
114121 */
115122 public function removeUserFromGroup ($ groupName , $ userName )
116123 {
117124 $ param = http_build_query (['groupname ' => $ groupName , 'username ' => $ userName ]);
118125
119- $ ret = $ this ->exec ($ this ->uri . '/user? ' . $ param , [], 'DELETE ' );
126+ $ ret = $ this ->exec ($ this ->uri . '/user? ' . $ param , [], 'DELETE ' );
120127
121128 $ this ->log ->addInfo ("Result= \n" .$ ret );
122129
0 commit comments