GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 13-16 lines in 10 locations

src/Route4Me/AddressBookLocation.php 1 location

@@ 96-108 (lines=13) @@
93
        return $result;
94
    }
95
    
96
    public static function getAddressBookLocations($params)
97
    {
98
        $ablocations = Route4Me::makeRequst(array(
99
            'url'    => Endpoint::ADDRESS_BOOK_V4,
100
            'method' => 'GET',
101
            'query'  => array(
102
                'limit'  => isset($params['limit']) ? $params['limit'] : null,
103
                'offset' => isset($params['offset']) ? $params['offset'] : null,
104
            )
105
        ));
106
107
        return $ablocations;
108
    }
109
    
110
    public static function getAddressBookLocationsByIDs($ids)
111
    {

src/Route4Me/Geocoding.php 1 location

@@ 31-46 (lines=16) @@
28
        return $geocoding;
29
    }
30
    
31
    public static function forwardGeocoding($params)
32
    {
33
        $body = array(
34
                'strExportFormat'    => isset($params['strExportFormat']) ? $params['strExportFormat']: null,
35
                'addresses' => isset($params['addresses']) ? $params['addresses'] : null,
36
            );
37
38
        $fgCoding = Route4Me::makeRequst(array(
39
            'url'    => Endpoint::GEOCODER,
40
            'method' => 'POST',
41
            'body'   => $body,
42
            'HTTPHEADER'  => 'Content-Type: multipart/form-data'
43
        ));
44
        
45
        return $fgCoding;
46
    }
47
    
48
    public static function reverseGeocoding($params)
49
    {

src/Route4Me/Territory.php 1 location

@@ 41-53 (lines=13) @@
38
		return $territoryparameters;
39
	}
40
	
41
	public static function getTerritory($params)
42
	{
43
		$territory = Route4Me::makeRequst(array(
44
			'url'    => Endpoint::TERRITORY_V4,
45
			'method' => 'GET',
46
			'query'  => array(
47
				'territory_id' => isset($params['territory_id']) ? $params['territory_id'] : null,
48
				'addresses'    => isset($params['addresses']) ? $params['addresses'] : null,
49
			)
50
		));
51
52
		return $territory;
53
	}
54
	
55
	public static function getTerritories($params)
56
	{

src/Route4Me/Address.php 3 locations

@@ 94-108 (lines=15) @@
91
    /*Get notes from the specified route destination
92
     * Returns an address object with notes, if an address exists, otherwise - return null.
93
     */
94
    public static function GetAddressesNotes($noteParams)
95
    {
96
        $address = Route4Me::makeRequst(array(
97
            'url'    => Endpoint::ADDRESS_V4,
98
            'method' => 'GET',
99
            'query'  => array(
100
                'route_id'             => isset($noteParams['route_id']) ? $noteParams['route_id'] : null, 
101
                'route_destination_id' => isset($noteParams['route_destination_id']) 
102
                                             ? $noteParams['route_destination_id'] : null,
103
                'notes'                => 1,
104
            )
105
        ));
106
    
107
        return $address;
108
    }
109
110
    public function update()
111
    {
@@ 125-138 (lines=14) @@
122
        return Address::fromArray($addressUpdate);
123
    }
124
    
125
    public function markAddress($params, $body)
126
    {
127
        $result = Route4Me::makeRequst(array(
128
            'url'    => Endpoint::ADDRESS_V4,
129
            'method' => 'PUT',
130
            'query'  => array(
131
                'route_id'             => isset($params['route_id']) ? $params['route_id'] : null, 
132
                'route_destination_id' => isset($params['route_destination_id']) ? $params['route_destination_id'] : null,
133
            ),
134
            'body'   => $body
135
        ));
136
    
137
        return $result;
138
    }
139
    
140
    public function markAsDeparted($params)
141
    {
@@ 248-260 (lines=13) @@
245
        return $result;
246
    }
247
248
    public function createCustomNoteType($params)
249
    {
250
        $result = Route4Me::makeRequst(array(
251
            'url'    => Endpoint::NOTE_CUSTOM_TYPES_V4,
252
            'method' => 'POST',
253
            'body'   => array(
254
                'type'   => isset($params['type']) ? $params['type'] : null,
255
                'values' => isset($params['values']) ? $params['values'] : null
256
            )
257
        ));
258
259
        return $result;
260
    }
261
    
262
    public function removeCustomNoteType($params)
263
    {

src/Route4Me/OptimizationProblem.php 3 locations

@@ 213-227 (lines=15) @@
210
        return $rAddress;
211
    }
212
    
213
    public function removeAddress($params)
214
    {
215
        $response = Route4Me::makeRequst(array(
216
            'url'    => Endpoint::ADDRESS_V4,
217
            'method' => 'DELETE',
218
            'query'  => array(
219
                'optimization_problem_id' => isset($params['optimization_problem_id'])
220
                                               ? $params['optimization_problem_id'] : null,
221
                'route_destination_id'    => isset($params['route_destination_id'])
222
                                               ? $params['route_destination_id'] : null,
223
            )
224
        ));
225
        
226
        return $response;
227
    }
228
    
229
    public function removeOptimization($params)
230
    {
@@ 229-244 (lines=16) @@
226
        return $response;
227
    }
228
    
229
    public function removeOptimization($params)
230
    {
231
        $response = Route4Me::makeRequst(array(
232
            'url'    => Endpoint::OPTIMIZATION_PROBLEM,
233
            'method' => 'DELETE',
234
            'query'  => array(
235
                'redirect' => isset($params['redirect']) ? $params['redirect'] : null,
236
            ),
237
            'body'   => array(
238
                'optimization_problem_ids' => isset($params['optimization_problem_ids'])
239
                                                ? $params['optimization_problem_ids'] : null,
240
            )
241
        ));
242
        
243
        return $response;
244
    }
245
    
246
    public function getHybridOptimization($params)
247
    {
@@ 246-260 (lines=15) @@
243
        return $response;
244
    }
245
    
246
    public function getHybridOptimization($params)
247
    {
248
        $optimize = Route4Me::makeRequst(array(
249
            'url'    => Endpoint::HYBRID_DATE_OPTIMIZATION,
250
            'method' => 'GET',
251
            'query'  => array(
252
                'target_date_string'      => isset($params['target_date_string'])
253
                                               ? $params['target_date_string'] : null,
254
                'timezone_offset_minutes' => isset($params['timezone_offset_minutes'])
255
                                               ? $params['timezone_offset_minutes'] : null
256
            )
257
        ));
258
259
        return $optimize;
260
    }
261
    
262
    Public function addDepotsToHybrid($params)
263
    {

src/Route4Me/Route.php 1 location

@@ 442-455 (lines=14) @@
439
        return $this->optimization_problem_id;
440
    }
441
    
442
    public function GetLastLocation(array $params)
443
    {
444
        $route = Route4Me::makeRequst(array(
445
            'url'    => Endpoint::ROUTE_V4,
446
            'method' => 'GET',
447
            'query'  => array(
448
                'api_key'                 => Route4Me::getApiKey(),
449
                'route_id'                => isset($params['route_id']) ? $params['route_id'] : null,
450
                'device_tracking_history' => isset($params['device_tracking_history']) ? $params['device_tracking_history'] : null
451
            )
452
        ));
453
454
        return Route::fromArray($route);
455
    }
456
    
457
    public function GetTrackingHistoryFromTimeRange(array $params)
458
    {