x Sorry, these patches are not available anymore due to data migration. Please run a fresh inspection.

Code Duplication    Length = 17-17 lines in 2 locations

src/DiegoSouza/Zimbra/ZimbraApiClient.php 2 locations

@@ 125-141 (lines=17) @@
122
        return $this->api->renameDistributionList($listId, $newName);
123
    }
124
125
    public function getAccountById($id)
126
    {
127
        $apllyCos = null;
128
129
        $attr = [
130
            'sn',
131
            'uid',
132
            'mail',
133
            'givenName',
134
            'zimbraMailQuota',
135
            'zimbraAccountStatus',
136
        ];
137
138
        $account = new AccountSelector(AccountBy::ID(), $id);
139
140
        return $this->api->getAccount($account, $apllyCos, $attr)->account;
141
    }
142
143
    public function getAccountByName($name)
144
    {
@@ 143-159 (lines=17) @@
140
        return $this->api->getAccount($account, $apllyCos, $attr)->account;
141
    }
142
143
    public function getAccountByName($name)
144
    {
145
        $apllyCos = null;
146
147
        $attr = [
148
            'sn',
149
            'uid',
150
            'mail',
151
            'givenName',
152
            'zimbraMailQuota',
153
            'zimbraAccountStatus',
154
        ];
155
156
        $account = new AccountSelector(AccountBy::NAME(), $name);
157
158
        return $this->api->getAccount($account, $apllyCos, $attr)->account;
159
    }
160
161
    public function getAccountMembershipByName($name)
162
    {