Code Duplication    Length = 8-11 lines in 4 locations

src/User/Group.php 3 locations

@@ 45-52 (lines=8) @@
42
     *
43
     * @return int
44
     */
45
    public function create($name)
46
    {
47
        $params = [
48
                   'group' => ['name' => $name],
49
                  ];
50
51
        return $this->parseJSON('json', [self::API_CREATE, $params]);
52
    }
53
54
    /**
55
     * List all groups.
@@ 72-82 (lines=11) @@
69
     *
70
     * @return bool
71
     */
72
    public function update($groupId, $name)
73
    {
74
        $params = [
75
                   'group' => [
76
                               'id' => $groupId,
77
                               'name' => $name,
78
                              ],
79
                  ];
80
81
        return $this->parseJSON('json', [self::API_UPDATE, $params]);
82
    }
83
84
    /**
85
     * Delete group.
@@ 91-98 (lines=8) @@
88
     *
89
     * @return bool
90
     */
91
    public function delete($groupId)
92
    {
93
        $params = [
94
                   'group' => ['id' => $groupId],
95
                  ];
96
97
        return $this->parseJSON('json', [self::API_DELETE, $params]);
98
    }
99
100
    /**
101
     * Get user group.

src/User/Tag.php 1 location

@@ 46-53 (lines=8) @@
43
     *
44
     * @return int
45
     */
46
    public function create($name)
47
    {
48
        $params = [
49
                   'tag' => ['name' => $name],
50
                  ];
51
52
        return $this->parseJSON('json', [self::API_CREATE, $params]);
53
    }
54
55
    /**
56
     * List all tags.