Completed
Push — master ( f619f7...59f6c6 )
by Luca
01:16
created

LDAPModel::migrateIdLDAP()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * This Driver is based entirely on official documentation of the Mattermost Web
4
 * Services API and you can extend it by following the directives of the documentation.
5
 *
6
 * God bless this mess.
7
 *
8
 * @author Luca Agnello <[email protected]>
9
 * @link https://api.mattermost.com/
10
 */
11
12
namespace Gnello\Mattermost\Models;
13
14
use Psr\Http\Message\ResponseInterface;
15
16
/**
17
 * Class LDAPModel
18
 *
19
 * @package Gnello\Mattermost\Models
20
 */
21 View Code Duplication
class LDAPModel extends AbstractModel
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

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.

Loading history...
22
{
23
    /**
24
     * @var string
25
     */
26
    private static $endpoint = '/ldap';
27
28
    /**
29
     * @return ResponseInterface
30
     */
31
    public function syncWithLDAP()
32
    {
33
        return $this->client->post(self::$endpoint . '/sync');
34
    }
35
36
    /**
37
     * @return ResponseInterface
38
     */
39
    public function testLDAPConfiguration()
40
    {
41
        return $this->client->post(self::$endpoint . '/test');
42
    }
43
44
    /**
45
     * @param array $requestOptions
46
     * @return ResponseInterface
47
     */
48
    public function migrateIdLDAP(array $requestOptions)
49
    {
50
        return $this->client->post(self::$endpoint . '/migrateid', $requestOptions);
51
    }
52
}
53