Code Duplication    Length = 13-13 lines in 2 locations

src/authnet/AuthnetApiFactory.php 2 locations

@@ 128-140 (lines=13) @@
125
     * @return  string                  The URL endpoint the request is to be sent to
126
     * @throws  \JohnConde\Authnet\AuthnetInvalidServerException
127
     */
128
    protected static function getSimURL($server)
129
    {
130
        if ($server === static::USE_PRODUCTION_SERVER) {
131
            $url = 'https://secure2.authorize.net/gateway/transact.dll';
132
        }
133
        else if ($server === static::USE_DEVELOPMENT_SERVER) {
134
            $url = 'https://test.authorize.net/gateway/transact.dll';
135
        }
136
        else {
137
            throw new AuthnetInvalidServerException('You did not provide a valid server.');
138
        }
139
        return $url;
140
    }
141
142
    /**
143
     * Validates the Authorize.Net credentials and returns a Webhooks Request object to be used to make an Webhook call
@@ 183-195 (lines=13) @@
180
     * @return  string                  The URL endpoint the request is to be sent to
181
     * @throws  \JohnConde\Authnet\AuthnetInvalidServerException
182
     */
183
    protected static function getWebhooksURL($server)
184
    {
185
        if ($server === static::USE_PRODUCTION_SERVER) {
186
            $url = 'https://api.authorize.net/rest/v1/';
187
        }
188
        else if ($server === static::USE_DEVELOPMENT_SERVER) {
189
            $url = 'https://apitest.authorize.net/rest/v1/';
190
        }
191
        else {
192
            throw new AuthnetInvalidServerException('You did not provide a valid server.');
193
        }
194
        return $url;
195
    }
196
}