1 | <?php |
||
16 | class Organizations extends Api |
||
17 | { |
||
18 | /** |
||
19 | * List organizations (permission needed: #organizations:read) |
||
20 | * List organizations the user is associated with |
||
21 | * |
||
22 | * @param string|null $status Whether or not the user is a member of the organization or has an inivitation pending |
||
23 | * @param string|null $name Organization Name |
||
24 | * @param int|null $page Page number of paginated results |
||
25 | * @param int|null $per_page Number of organizations per page |
||
26 | * @param string|null $order Field to order organizations by |
||
27 | * @param string|null $direction Direction to order organizations |
||
28 | * @param string|null $match Whether to match all search requirements or at least one (any) |
||
29 | */ |
||
30 | public function organizations($status = null, $name = null, $page = null, $per_page = null, $order = null, $direction = null, $match = null) |
||
44 | |||
45 | /** |
||
46 | * Organization details (permission needed: #organizations:read) |
||
47 | * Get a specific organization the user is associated with |
||
48 | * |
||
49 | * @param string $identifier |
||
50 | */ |
||
51 | public function details($identifier) |
||
55 | |||
56 | /** |
||
57 | * Leave organization (permission needed: #organizations:edit) |
||
58 | * Remove association to an organization |
||
59 | * |
||
60 | * @param string $identifier |
||
61 | */ |
||
62 | public function leave($identifier) |
||
66 | } |
||
67 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.