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.
Test Failed
Push — master ( 77a95b...6c805f )
by Igor
08:36 queued 12s
created
src/Route4Me/Enum/OptimizationStates.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -6,22 +6,22 @@
 block discarded – undo
6 6
 
7 7
 class OptimizationStates
8 8
 {
9
-    const NEW = 0;
10
-    const INITIAL = 1;
11
-    const MATRIX_PROCESSING = 2;
12
-    const OPTIMIZING = 3;
13
-    const OPTIMIZED = 4;
14
-    const ERROR = 5;
15
-    const COMPUTING_DIRECTIONS = 6;
16
-    const IN_QUEUE = 7;
9
+	const NEW = 0;
10
+	const INITIAL = 1;
11
+	const MATRIX_PROCESSING = 2;
12
+	const OPTIMIZING = 3;
13
+	const OPTIMIZED = 4;
14
+	const ERROR = 5;
15
+	const COMPUTING_DIRECTIONS = 6;
16
+	const IN_QUEUE = 7;
17 17
 
18
-    public static function getName(int $state) : string
19
-    {
20
-        $refl = new ReflectionClass(__CLASS__);
21
-        foreach($refl->getConstants() AS $key => $val)
22
-        {
23
-            if($val == $state) return $key;
24
-        }
25
-        return 'UNKNOWN';
26
-    }
18
+	public static function getName(int $state) : string
19
+	{
20
+		$refl = new ReflectionClass(__CLASS__);
21
+		foreach($refl->getConstants() AS $key => $val)
22
+		{
23
+			if($val == $state) return $key;
24
+		}
25
+		return 'UNKNOWN';
26
+	}
27 27
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/Enum/TelematicsVendorsTypes.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@
 block discarded – undo
7 7
  */
8 8
 class TelematicsVendorsTypes 
9 9
 {
10
-    const TOMTOM = 'tomtom';
10
+	const TOMTOM = 'tomtom';
11 11
     
12
-    const TELETRAC = 'teletrac';
12
+	const TELETRAC = 'teletrac';
13 13
     
14
-    const AZUGA = 'azuga';
14
+	const AZUGA = 'azuga';
15 15
     
16
-    const GEOTAB = 'geotab';
16
+	const GEOTAB = 'geotab';
17 17
     
18
-    const SILENT_PASSENGER = 'silentpassenger';
18
+	const SILENT_PASSENGER = 'silentpassenger';
19 19
     
20
-    const NEW_TELETRAC = 'new_teletrac';
20
+	const NEW_TELETRAC = 'new_teletrac';
21 21
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/Enum/AlgorithmType.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -4,15 +4,15 @@
 block discarded – undo
4 4
 
5 5
 class AlgorithmType
6 6
 {
7
-    const STATE_NEW = 0;
8
-    const TSP = 1;
9
-    const VRP = 2;
10
-    const CVRP_TW_SD = 3;
11
-    const CVRP_TW_MD = 4;
12
-    const TSP_TW = 5;
13
-    const TSP_TW_CR = 6;
14
-    const OPTIMIZATION_STATE_IN_QUEUE = 7;
15
-    const ADVANCED_CVRP_TW = 9;
16
-    const ALG_NONE = 100;
17
-    const ALG_LEGACY_DISTRIBUTED = 101;
7
+	const STATE_NEW = 0;
8
+	const TSP = 1;
9
+	const VRP = 2;
10
+	const CVRP_TW_SD = 3;
11
+	const CVRP_TW_MD = 4;
12
+	const TSP_TW = 5;
13
+	const TSP_TW_CR = 6;
14
+	const OPTIMIZATION_STATE_IN_QUEUE = 7;
15
+	const ADVANCED_CVRP_TW = 9;
16
+	const ALG_NONE = 100;
17
+	const ALG_LEGACY_DISTRIBUTED = 101;
18 18
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/Enum/Metric.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,9 +4,9 @@
 block discarded – undo
4 4
 
5 5
 class Metric
6 6
 {
7
-    const EUCLIDEAN = 1; //measures point to point distance as a straight line
8
-    const MANHATTAN = 2; //measures point to point distance as taxicab geometry line
9
-    const GEODESIC = 3; //measures point to point distance approximating curvature of the earth
10
-    const MATRIX = 4; //measures point to point distance by traversing the actual road network
11
-    const EXACT_2D = 5; //measures point to point distance using 2d rectilinear distance
7
+	const EUCLIDEAN = 1; //measures point to point distance as a straight line
8
+	const MANHATTAN = 2; //measures point to point distance as taxicab geometry line
9
+	const GEODESIC = 3; //measures point to point distance approximating curvature of the earth
10
+	const MATRIX = 4; //measures point to point distance by traversing the actual road network
11
+	const EXACT_2D = 5; //measures point to point distance using 2d rectilinear distance
12 12
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/Enum/DeviceType.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,9 +4,9 @@
 block discarded – undo
4 4
 
5 5
 class DeviceType
6 6
 {
7
-    const WEB = 'web';
8
-    const IPHONE = 'iphone';
9
-    const IPAD = 'ipad';
10
-    const ANDROID_PHONE = 'android_phone';
11
-    const ANDROID_TABLET = 'android_tablet';
7
+	const WEB = 'web';
8
+	const IPHONE = 'iphone';
9
+	const IPAD = 'ipad';
10
+	const ANDROID_PHONE = 'android_phone';
11
+	const ANDROID_TABLET = 'android_tablet';
12 12
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/Enum/TravelMode.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,9 +4,9 @@
 block discarded – undo
4 4
 
5 5
 class TravelMode
6 6
 {
7
-    const DRIVING = 'Driving';
8
-    const WALKING = 'Walking';
9
-    const TRUCKING = 'Trucking';
10
-    const CYCLING = 'Cycling';
11
-    const TRANSIT = 'Transit';
7
+	const DRIVING = 'Driving';
8
+	const WALKING = 'Walking';
9
+	const TRUCKING = 'Trucking';
10
+	const CYCLING = 'Cycling';
11
+	const TRANSIT = 'Transit';
12 12
 }
Please login to merge, or discard this patch.
src/Route4Me/Address.php 1 patch
Indentation   +213 added lines, -213 removed lines patch added patch discarded remove patch
@@ -7,227 +7,227 @@
 block discarded – undo
7 7
 
8 8
 class Address extends Common
9 9
 {
10
-    public $route_destination_id;
11
-    public $alias;
12
-    public $member_id;
13
-    public $address;
14
-    public $addressUpdate;
15
-    public $is_depot = false;
16
-    public $lat;
17
-    public $lng;
18
-    public $route_id;
19
-    public $original_route_id;
20
-    public $optimization_problem_id;
21
-    public $sequence_no;
22
-    public $geocoded;
23
-    public $preferred_geocoding;
24
-    public $failed_geocoding;
25
-    public $geocodings = [];
26
-    public $contact_id;
27
-    public $is_visited;
28
-    public $customer_po;
29
-    public $invoice_no;
30
-    public $reference_no;
31
-    public $order_no;
32
-    public $weight;
33
-    public $cost;
34
-    public $revenue;
35
-    public $cube;
36
-    public $pieces;
37
-    public $email;
38
-    public $phone;
39
-    public $tracking_number;
40
-    public $destination_note_count;
41
-    public $drive_time_to_next_destination;
42
-    public $distance_to_next_destination;
43
-    public $generated_time_window_start;
44
-    public $generated_time_window_end;
45
-    public $time_window_start;
46
-    public $time_window_end;
47
-    public $time;
48
-    public $notes;
49
-    public $timestamp_last_visited;
50
-    public $custom_fields = [];
51
-    public $manifest = [];
52
-
53
-    public $first_name;
54
-    public $last_name;
55
-    public $is_departed;
56
-    public $timestamp_last_departed;
57
-    public $order_id;
58
-    public $priority;
59
-    public $curbside_lat;
60
-    public $curbside_lng;
61
-    public $time_window_start_2;
62
-    public $time_window_end_2;
63
-
64
-    public $timeframe_violation_state;
65
-    public $timeframe_violation_time;
66
-    public $timeframe_violation_rate;
67
-    public $route_name;
68
-    public $address_stop_type;
69
-    public $visited_lat;
70
-    public $visited_lng;
71
-    public $departed_lat;
72
-    public $departed_lng;
73
-    public $group;
74
-    public $abnormal_traffic_time_to_next_destination;
75
-    public $uncongested_time_to_next_destination;
76
-    public $traffic_time_to_next_destination;
77
-    public $channel_name;
78
-    public $pickup;
79
-    public $dropoff;
80
-    public $joint;
81
-    public $geofence_detected_visited_timestamp;
82
-    public $geofence_detected_departed_timestamp;
83
-    public $geofence_detected_service_time;
84
-    public $geofence_detected_visited_lat;
85
-    public $geofence_detected_visited_lng;
86
-    public $geofence_detected_departed_lat;
87
-    public $geofence_detected_departed_lng;
88
-    public $custom_fields_str_json;
89
-    public $custom_fields_config;
90
-    public $custom_fields_config_str_json;
91
-    public $bundle_count;
92
-    public $bundle_items;
93
-    public $order_inventory;
94
-    public $required_skills;
95
-    public $udu_distance_to_next_destination;
96
-    public $wait_time_to_next_destination;
97
-    public $path_to_next = [];
98
-    public $additional_status;
99
-    public $tags = [];
100
-
101
-    public function __construct()
102
-    {
103
-        Route4Me::setBaseUrl(Endpoint::BASE_URL);
104
-    }
105
-
106
-    public static function fromArray(array $params)
107
-    {
108
-        $address = new self();
109
-
110
-        foreach ($params as $key => $value) {
111
-            if (property_exists($address, $key)) {
112
-                $address->{$key} = $value;
113
-            } else {
114
-                throw new BadParam("Correct parameter must be provided. Wrong Parameter: $key");
115
-            }
116
-        }
117
-
118
-        return $address;
119
-    }
120
-
121
-    public static function getAddress($routeId, $addressId)
122
-    {
123
-        $address = Route4Me::makeRequst([
124
-            'url'       => Endpoint::ADDRESS_V4,
125
-            'method'    => 'GET',
126
-            'query'     => [
127
-                'route_id'              => $routeId,
128
-                'route_destination_id'  => $addressId,
129
-            ],
130
-        ]);
131
-
132
-        return self::fromArray($address);
133
-    }
134
-
135
-    public function update()
136
-    {
137
-        $addressUpdate = Route4Me::makeRequst([
138
-            'url'       => Endpoint::ADDRESS_V4,
139
-            'method'    => 'PUT',
140
-            'body'      => $this->toArray(),
141
-            'query'     => [
142
-                'route_id'              => $this->route_id,
143
-                'route_destination_id'  => $this->route_destination_id,
144
-            ],
145
-        ]);
146
-
147
-        return self::fromArray($addressUpdate);
148
-    }
149
-
150
-    /*
10
+	public $route_destination_id;
11
+	public $alias;
12
+	public $member_id;
13
+	public $address;
14
+	public $addressUpdate;
15
+	public $is_depot = false;
16
+	public $lat;
17
+	public $lng;
18
+	public $route_id;
19
+	public $original_route_id;
20
+	public $optimization_problem_id;
21
+	public $sequence_no;
22
+	public $geocoded;
23
+	public $preferred_geocoding;
24
+	public $failed_geocoding;
25
+	public $geocodings = [];
26
+	public $contact_id;
27
+	public $is_visited;
28
+	public $customer_po;
29
+	public $invoice_no;
30
+	public $reference_no;
31
+	public $order_no;
32
+	public $weight;
33
+	public $cost;
34
+	public $revenue;
35
+	public $cube;
36
+	public $pieces;
37
+	public $email;
38
+	public $phone;
39
+	public $tracking_number;
40
+	public $destination_note_count;
41
+	public $drive_time_to_next_destination;
42
+	public $distance_to_next_destination;
43
+	public $generated_time_window_start;
44
+	public $generated_time_window_end;
45
+	public $time_window_start;
46
+	public $time_window_end;
47
+	public $time;
48
+	public $notes;
49
+	public $timestamp_last_visited;
50
+	public $custom_fields = [];
51
+	public $manifest = [];
52
+
53
+	public $first_name;
54
+	public $last_name;
55
+	public $is_departed;
56
+	public $timestamp_last_departed;
57
+	public $order_id;
58
+	public $priority;
59
+	public $curbside_lat;
60
+	public $curbside_lng;
61
+	public $time_window_start_2;
62
+	public $time_window_end_2;
63
+
64
+	public $timeframe_violation_state;
65
+	public $timeframe_violation_time;
66
+	public $timeframe_violation_rate;
67
+	public $route_name;
68
+	public $address_stop_type;
69
+	public $visited_lat;
70
+	public $visited_lng;
71
+	public $departed_lat;
72
+	public $departed_lng;
73
+	public $group;
74
+	public $abnormal_traffic_time_to_next_destination;
75
+	public $uncongested_time_to_next_destination;
76
+	public $traffic_time_to_next_destination;
77
+	public $channel_name;
78
+	public $pickup;
79
+	public $dropoff;
80
+	public $joint;
81
+	public $geofence_detected_visited_timestamp;
82
+	public $geofence_detected_departed_timestamp;
83
+	public $geofence_detected_service_time;
84
+	public $geofence_detected_visited_lat;
85
+	public $geofence_detected_visited_lng;
86
+	public $geofence_detected_departed_lat;
87
+	public $geofence_detected_departed_lng;
88
+	public $custom_fields_str_json;
89
+	public $custom_fields_config;
90
+	public $custom_fields_config_str_json;
91
+	public $bundle_count;
92
+	public $bundle_items;
93
+	public $order_inventory;
94
+	public $required_skills;
95
+	public $udu_distance_to_next_destination;
96
+	public $wait_time_to_next_destination;
97
+	public $path_to_next = [];
98
+	public $additional_status;
99
+	public $tags = [];
100
+
101
+	public function __construct()
102
+	{
103
+		Route4Me::setBaseUrl(Endpoint::BASE_URL);
104
+	}
105
+
106
+	public static function fromArray(array $params)
107
+	{
108
+		$address = new self();
109
+
110
+		foreach ($params as $key => $value) {
111
+			if (property_exists($address, $key)) {
112
+				$address->{$key} = $value;
113
+			} else {
114
+				throw new BadParam("Correct parameter must be provided. Wrong Parameter: $key");
115
+			}
116
+		}
117
+
118
+		return $address;
119
+	}
120
+
121
+	public static function getAddress($routeId, $addressId)
122
+	{
123
+		$address = Route4Me::makeRequst([
124
+			'url'       => Endpoint::ADDRESS_V4,
125
+			'method'    => 'GET',
126
+			'query'     => [
127
+				'route_id'              => $routeId,
128
+				'route_destination_id'  => $addressId,
129
+			],
130
+		]);
131
+
132
+		return self::fromArray($address);
133
+	}
134
+
135
+	public function update()
136
+	{
137
+		$addressUpdate = Route4Me::makeRequst([
138
+			'url'       => Endpoint::ADDRESS_V4,
139
+			'method'    => 'PUT',
140
+			'body'      => $this->toArray(),
141
+			'query'     => [
142
+				'route_id'              => $this->route_id,
143
+				'route_destination_id'  => $this->route_destination_id,
144
+			],
145
+		]);
146
+
147
+		return self::fromArray($addressUpdate);
148
+	}
149
+
150
+	/*
151 151
      * Marks an address as marked as visited/as departed
152 152
      * depending on which parameter is specified: 'is_visited' or 'is_departed'.
153 153
      */
154
-    public function markAddress($params)
155
-    {
156
-        $allQueryFields = ['route_id', 'route_destination_id'];
157
-        $allBodyFields = ['is_visited', 'is_departed'];
158
-
159
-        $result = Route4Me::makeRequst([
160
-            'url' => Endpoint::ADDRESS_V4,
161
-            'method'    => 'PUT',
162
-            'query'     => Route4Me::generateRequestParameters($allQueryFields, $params),
163
-            'body'      => Route4Me::generateRequestParameters($allBodyFields, $params),
164
-        ]);
165
-
166
-        return $result;
167
-    }
168
-
169
-    /*
154
+	public function markAddress($params)
155
+	{
156
+		$allQueryFields = ['route_id', 'route_destination_id'];
157
+		$allBodyFields = ['is_visited', 'is_departed'];
158
+
159
+		$result = Route4Me::makeRequst([
160
+			'url' => Endpoint::ADDRESS_V4,
161
+			'method'    => 'PUT',
162
+			'query'     => Route4Me::generateRequestParameters($allQueryFields, $params),
163
+			'body'      => Route4Me::generateRequestParameters($allBodyFields, $params),
164
+		]);
165
+
166
+		return $result;
167
+	}
168
+
169
+	/*
170 170
      * Marks an address as departed.
171 171
      */
172
-    public function markAsDeparted($params)
173
-    {
174
-        $allQueryFields = ['route_id', 'address_id', 'is_departed', 'member_id'];
172
+	public function markAsDeparted($params)
173
+	{
174
+		$allQueryFields = ['route_id', 'address_id', 'is_departed', 'member_id'];
175 175
 
176
-        $address = Route4Me::makeRequst([
177
-            'url'       => Endpoint::MARK_ADDRESS_DEPARTED,
178
-            'method'    => 'PUT',
179
-            'query'     => Route4Me::generateRequestParameters($allQueryFields, $params),
180
-        ]);
176
+		$address = Route4Me::makeRequst([
177
+			'url'       => Endpoint::MARK_ADDRESS_DEPARTED,
178
+			'method'    => 'PUT',
179
+			'query'     => Route4Me::generateRequestParameters($allQueryFields, $params),
180
+		]);
181 181
 
182
-        return $address;
183
-    }
182
+		return $address;
183
+	}
184 184
 
185
-    /*
185
+	/*
186 186
      * Marks an address as visited.
187 187
      */
188
-    public function markAsVisited($params)
189
-    {
190
-        $allQueryFields = ['route_id', 'address_id', 'is_visited', 'member_id'];
191
-
192
-        $address = Route4Me::makeRequst([
193
-            'url'       => Endpoint::UPDATE_ADDRESS_VISITED,
194
-            'method'    => 'PUT',
195
-            'query'     => Route4Me::generateRequestParameters($allQueryFields, $params),
196
-        ]);
197
-
198
-        return $address;
199
-    }
200
-
201
-    public function deleteAddress()
202
-    {
203
-        $address = Route4Me::makeRequst([
204
-            'url'       => Endpoint::ADDRESS_V4,
205
-            'method'    => 'DELETE',
206
-            'query'     => [
207
-                'route_id'              => $this->route_id,
208
-                'route_destination_id'  => $this->route_destination_id,
209
-            ],
210
-        ]);
211
-
212
-        return (bool) $address['deleted'];
213
-    }
214
-
215
-    public function moveDestinationToRoute($params)
216
-    {
217
-        $allBodyFields = ['to_route_id', 'route_destination_id', 'after_destination_id'];
218
-
219
-        $result = Route4Me::makeRequst([
220
-            'url'           => Endpoint::MOVE_ROUTE_DESTINATION,
221
-            'method'        => 'POST',
222
-            'body'          => Route4Me::generateRequestParameters($allBodyFields, $params),
223
-            'HTTPHEADER'    => 'Content-Type: multipart/form-data',
224
-        ]);
225
-
226
-        return $result;
227
-    }
228
-
229
-    public function getAddressId()
230
-    {
231
-        return $this->route_destination_id;
232
-    }
188
+	public function markAsVisited($params)
189
+	{
190
+		$allQueryFields = ['route_id', 'address_id', 'is_visited', 'member_id'];
191
+
192
+		$address = Route4Me::makeRequst([
193
+			'url'       => Endpoint::UPDATE_ADDRESS_VISITED,
194
+			'method'    => 'PUT',
195
+			'query'     => Route4Me::generateRequestParameters($allQueryFields, $params),
196
+		]);
197
+
198
+		return $address;
199
+	}
200
+
201
+	public function deleteAddress()
202
+	{
203
+		$address = Route4Me::makeRequst([
204
+			'url'       => Endpoint::ADDRESS_V4,
205
+			'method'    => 'DELETE',
206
+			'query'     => [
207
+				'route_id'              => $this->route_id,
208
+				'route_destination_id'  => $this->route_destination_id,
209
+			],
210
+		]);
211
+
212
+		return (bool) $address['deleted'];
213
+	}
214
+
215
+	public function moveDestinationToRoute($params)
216
+	{
217
+		$allBodyFields = ['to_route_id', 'route_destination_id', 'after_destination_id'];
218
+
219
+		$result = Route4Me::makeRequst([
220
+			'url'           => Endpoint::MOVE_ROUTE_DESTINATION,
221
+			'method'        => 'POST',
222
+			'body'          => Route4Me::generateRequestParameters($allBodyFields, $params),
223
+			'HTTPHEADER'    => 'Content-Type: multipart/form-data',
224
+		]);
225
+
226
+		return $result;
227
+	}
228
+
229
+	public function getAddressId()
230
+	{
231
+		return $this->route_destination_id;
232
+	}
233 233
 }
Please login to merge, or discard this patch.