Code Duplication    Length = 11-14 lines in 6 locations

src/Networks/NetAffiliation.php 1 location

@@ 38-49 (lines=12) @@
35
    /**
36
     * @return bool
37
     */
38
    public function checkLogin() : bool
39
    {
40
        $credentials = array();
41
        $credentials["user"] = $this->_username;
42
        $credentials["password"] = $this->_password;
43
        $this->_network->login($credentials);
44
        if ($this->_network->checkConnection()) {
45
            return true;
46
        }
47
48
        return false;
49
    }
50
51
    /**
52
     * @return array of Merchants

src/Networks/TradeDoubler.php 1 location

@@ 40-51 (lines=12) @@
37
    /**
38
     * @return bool
39
     */
40
    public function checkLogin() : bool
41
    {
42
        $credentials = array();
43
        $credentials["user"] = $this->_username;
44
        $credentials["password"] = $this->_password;
45
        $this->_network->login($credentials);
46
        if ($this->_network->checkConnection()) {
47
            return true;
48
        }
49
50
        return false;
51
    }
52
53
    /**
54
     * @return array of Merchants

src/Networks/Zanox.php 1 location

@@ 42-53 (lines=12) @@
39
    /**
40
     * @return bool
41
     */
42
    public function checkLogin() : bool
43
    {
44
        $credentials = array();
45
        $credentials["connectid"] = $this->_username;
46
        $credentials["secretkey"] = $this->_password;
47
        $this->_network->login($credentials);
48
        if ($this->_network->checkConnection()) {
49
            return true;
50
        }
51
52
        return false;
53
    }
54
55
    /**
56
     * @return array of Merchants

src/Networks/Effiliation.php 1 location

@@ 40-50 (lines=11) @@
37
    /**
38
     * @return bool
39
     */
40
    public function checkLogin() : bool
41
    {
42
        $credentials = array();
43
        $credentials["apipassword"] = $this->_password;
44
        $this->_network->login($credentials);
45
        if ($this->_network->checkConnection()) {
46
            return true;
47
        }
48
49
        return false;
50
    }
51
52
    /**
53
     * @return array of Merchants

src/Networks/WebGains.php 1 location

@@ 47-58 (lines=12) @@
44
    /**
45
     * @return bool
46
     */
47
    public function checkLogin() : bool
48
    {
49
        $credentials = array();
50
        $credentials["user"] = $this->_username;
51
        $credentials["password"] = $this->_password;
52
        $this->_network->login($credentials);
53
        if ($this->_network->checkConnection()) {
54
            return true;
55
        }
56
57
        return false;
58
    }
59
60
    /**
61
     * @return array of Merchants

src/Networks/CommissionJunction.php 1 location

@@ 46-59 (lines=14) @@
43
    /**
44
     * @return bool
45
     */
46
    public function checkLogin() : bool
47
    {
48
        $credentials = array();
49
        $credentials["user"] = $this->_username;
50
        $credentials["password"] = $this->_password;
51
        $credentials["apipassword"] = $this->_passwordApi;
52
53
        $this->_network->login($credentials);
54
        if ($this->_network->checkConnection()) {
55
            return true;
56
        }
57
58
        return false;
59
    }
60
61
    /**
62
     * @return array of Merchants