Code Duplication    Length = 13-16 lines in 8 locations

src/Networks/TradeDoubler.php 1 location

@@ 79-94 (lines=16) @@
76
    /**
77
     * @return array of Merchants
78
     */
79
    public function getMerchants() : array
80
    {
81
        if (!$this->checkLogin()) {
82
            return array();
83
        }
84
        $arrResult = array();
85
        $merchantList = $this->_network->getMerchantList();
86
        foreach($merchantList as $merchant) {
87
            $Merchant = Merchant::createInstance();
88
            $Merchant->merchant_ID = $merchant['cid'];
89
            $Merchant->name = $merchant['name'];
90
            $arrResult[] = $Merchant;
91
        }
92
93
        return $arrResult;
94
    }
95
96
    /**
97
     * @param int|null $merchantID

src/Networks/Zanox.php 1 location

@@ 80-95 (lines=16) @@
77
    /**
78
     * @return array of Merchants
79
     */
80
    public function getMerchants(): array
81
    {
82
        if (!$this->checkLogin()) {
83
            return array();
84
        }
85
        $arrResult = array();
86
        $merchantList = $this->_network->getMerchantList();
87
        foreach ($merchantList as $merchant) {
88
            $Merchant = Merchant::createInstance();
89
            $Merchant->merchant_ID = $merchant['cid'];
90
            $Merchant->name = $merchant['name'];
91
            $arrResult[] = $Merchant;
92
        }
93
94
        return $arrResult;
95
    }
96
97
    /**
98
     * @param int|null $merchantID

src/Networks/AffiliateWindow.php 1 location

@@ 74-89 (lines=16) @@
71
    /**
72
     * @return array of Merchants
73
     */
74
    public function getMerchants() : array
75
    {
76
        if (!$this->checkLogin()) {
77
            return array();
78
        }
79
        $arrResult = array();
80
        $merchantList = $this->_network->getMerchantList();
81
        foreach($merchantList as $merchant) {
82
            $Merchant = Merchant::createInstance();
83
            $Merchant->merchant_ID = $merchant['cid'];
84
            $Merchant->name = $merchant['name'];
85
            $arrResult[] = $Merchant;
86
        }
87
88
        return $arrResult;
89
    }
90
91
    /**
92
     * @param int|null $merchantID

src/Networks/NetAffiliation.php 1 location

@@ 92-107 (lines=16) @@
89
    /**
90
     * @return array of Merchants
91
     */
92
    public function getMerchants() : array
93
    {
94
        if (!$this->checkLogin()) {
95
            return array();
96
        }
97
        $arrResult = array();
98
        $merchantList = $this->_network->getMerchantList();
99
        foreach($merchantList as $merchant) {
100
            $Merchant = Merchant::createInstance();
101
            $Merchant->merchant_ID = $merchant['cid'];
102
            $Merchant->name = $merchant['name'];
103
            $arrResult[] = $Merchant;
104
        }
105
106
        return $arrResult;
107
    }
108
109
    /**
110
     * @param int|null $merchantID

src/Networks/Affilinet.php 1 location

@@ 82-94 (lines=13) @@
79
    /**
80
     * @return array of Merchants
81
     */
82
    public function getMerchants(): array
83
    {
84
        $arrResult = array();
85
        $merchantList = $this->_network->getMerchantList();
86
        foreach ($merchantList as $merchant) {
87
            $Merchant = Merchant::createInstance();
88
            $Merchant->merchant_ID = $merchant['cid'];
89
            $Merchant->name = $merchant['name'];
90
            $arrResult[] = $Merchant;
91
        }
92
93
        return $arrResult;
94
    }
95
96
    /**
97
     * @param int $merchantID

src/Networks/CommissionJunction.php 1 location

@@ 83-95 (lines=13) @@
80
    /**
81
     * @return array of Merchants
82
     */
83
    public function getMerchants(): array
84
    {
85
        $arrResult = array();
86
        $merchantList = $this->_network->getMerchantList();
87
        foreach ($merchantList as $merchant) {
88
            $Merchant = Merchant::createInstance();
89
            $Merchant->merchant_ID = $merchant['cid'];
90
            $Merchant->name = $merchant['name'];
91
            $arrResult[] = $Merchant;
92
        }
93
94
        return $arrResult;
95
    }
96
97
    /**
98
     * @param int $merchantID

src/Networks/Publicideas.php 1 location

@@ 77-89 (lines=13) @@
74
    /**
75
     * @return array of Merchants
76
     */
77
    public function getMerchants() : array
78
    {
79
        $arrResult = array();
80
        $merchantList = $this->_network->getMerchantList();
81
        foreach($merchantList as $merchant) {
82
            $Merchant = Merchant::createInstance();
83
            $Merchant->merchant_ID = $merchant['cid'];
84
            $Merchant->name = $merchant['name'];
85
            $arrResult[] = $Merchant;
86
        }
87
88
        return $arrResult;
89
    }
90
91
    /**
92
     * @param int $merchantID

src/Networks/WebGains.php 1 location

@@ 78-90 (lines=13) @@
75
    /**
76
     * @return array of Merchants
77
     */
78
    public function getMerchants() : array
79
    {
80
        $arrResult = array();
81
        $merchantList = $this->_network->getMerchantList();
82
        foreach($merchantList as $merchant) {
83
            $Merchant = Merchant::createInstance();
84
            $Merchant->merchant_ID = $merchant['cid'];
85
            $Merchant->name = $merchant['name'];
86
            $arrResult[] = $Merchant;
87
        }
88
89
        return $arrResult;
90
    }
91
92
    /**
93
     * @param int $merchantID