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.
Completed
Push — master ( 55318a...b54c2e )
by Oleg
02:27
created
examples/Addresses/mark_address_as_detected_as_departed.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
 
26 26
 if (isset($addressRand['is_depot']))
27 27
 {
28
-    if ($addressRand['is_depot']) {
29
-        echo "Random choosed address is depot, it can't be marked!.. Try again.";
30
-        return;
31
-    }
28
+	if ($addressRand['is_depot']) {
29
+		echo "Random choosed address is depot, it can't be marked!.. Try again.";
30
+		return;
31
+	}
32 32
 }
33 33
 
34 34
 // Get random address's id from selected route above
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
 
40 40
 // Mark the address as detected as deoarted
41 41
 $addressParameters = (array)Address::fromArray(array(
42
-    "route_id"              => $routeId,
43
-    "route_destination_id"  => $route_destination_id,
44
-    "is_departed"           => TRUE
42
+	"route_id"              => $routeId,
43
+	"route_destination_id"  => $route_destination_id,
44
+	"is_departed"           => TRUE
45 45
 ));
46 46
 
47 47
 $address = new Address();
Please login to merge, or discard this patch.
examples/get_route_tracking.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@
 block discarded – undo
19 19
 assert(!is_null($route_id), "Can't retrieve a random route ID");
20 20
 
21 21
 $params = array(
22
-    'device_tracking_history' => true, 
23
-    'route_id' => $route_id
22
+	'device_tracking_history' => true, 
23
+	'route_id' => $route_id
24 24
 );
25 25
 
26 26
 // Get route tracking
Please login to merge, or discard this patch.
examples/Routes/ResequenceRoute.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
 
19 19
 // Select a route with more than 4 addresses.
20 20
 $routesParams = array(
21
-    "offset"  =>  0,
22
-    "limit"   =>  20
21
+	"offset"  =>  0,
22
+	"limit"   =>  20
23 23
 );
24 24
 
25 25
 $routes = $route->getRoutes($routesParams);
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
 $selectedRoute = null;
28 28
 
29 29
 foreach ($routes as $route1) {
30
-    if (isset($route1->destination_count)) {
31
-        if ($route1->destination_count>4) {
32
-            $selectedRoute = $route->getRoutes(array('route_id' => $route1->route_id));
33
-            break;
34
-        }
35
-    }
30
+	if (isset($route1->destination_count)) {
31
+		if ($route1->destination_count>4) {
32
+			$selectedRoute = $route->getRoutes(array('route_id' => $route1->route_id));
33
+			break;
34
+		}
35
+	}
36 36
 }
37 37
 
38 38
 assert(!is_null($selectedRoute), "Can't select a route with more than 4 addresses");
@@ -44,19 +44,19 @@  discard block
 block discarded – undo
44 44
 echo "Route ID-> $routeID, Route destination ID -> $routeDestinationID <br>"; 
45 45
 
46 46
 $params = array(
47
-    "route_id"              => $routeID,
48
-    "route_destination_id"  => $routeDestinationID,
49
-    "addresses"  => array(
50
-        "0" => array(
51
-            "route_destination_id"  => $routeDestinationID,
52
-            "sequence_no"           => 3
53
-        )
54
-    )
47
+	"route_id"              => $routeID,
48
+	"route_destination_id"  => $routeDestinationID,
49
+	"addresses"  => array(
50
+		"0" => array(
51
+			"route_destination_id"  => $routeDestinationID,
52
+			"sequence_no"           => 3
53
+		)
54
+	)
55 55
 );
56 56
 
57 57
 $response = $route->resequenceRoute($params);
58 58
 
59 59
 foreach ($response['addresses'] as $address) {
60
-    Route4Me::simplePrint($address);
61
-    echo "<br>";
60
+	Route4Me::simplePrint($address);
61
+	echo "<br>";
62 62
 }
Please login to merge, or discard this patch.
examples/Routes/GetRoutePathPoints.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -23,23 +23,23 @@
 block discarded – undo
23 23
 
24 24
 // Get a route with the path points
25 25
 $params = array(
26
-    "route_path_output" => "Points",
27
-    "route_id"   => $route_id
26
+	"route_path_output" => "Points",
27
+	"route_id"   => $route_id
28 28
 );
29 29
 
30 30
 $routeResults = (array)$route->getRoutePoints($params);
31 31
 
32 32
 if (isset($routeResults['addresses'])) {
33
-    foreach ($routeResults['addresses'] as $key => $address) {
34
-        $araddress = (array)$address;
33
+	foreach ($routeResults['addresses'] as $key => $address) {
34
+		$araddress = (array)$address;
35 35
 
36
-        if (isset($araddress['route_destination_id'])) echo "route_destination_id=".$araddress['route_destination_id']."<br>";
36
+		if (isset($araddress['route_destination_id'])) echo "route_destination_id=".$araddress['route_destination_id']."<br>";
37 37
         
38
-        if (isset($araddress['path_to_next'])) {
39
-            echo "path_to_next:<br>";
40
-            Route4Me::simplePrint($araddress['path_to_next']);
41
-        }
38
+		if (isset($araddress['path_to_next'])) {
39
+			echo "path_to_next:<br>";
40
+			Route4Me::simplePrint($araddress['path_to_next']);
41
+		}
42 42
         
43
-        echo "<br>";
44
-    }
43
+		echo "<br>";
44
+	}
45 45
 }
Please login to merge, or discard this patch.
examples/Routes/GetRoutePathPointsCompressed.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -23,24 +23,24 @@
 block discarded – undo
23 23
 
24 24
 // Get a route with the path points
25 25
 $params = array(
26
-    "route_path_output"     => "Points",
27
-    "compress_path_points"  => TRUE,
28
-    "route_id"              => $route_id
26
+	"route_path_output"     => "Points",
27
+	"compress_path_points"  => TRUE,
28
+	"route_id"              => $route_id
29 29
 );
30 30
 
31 31
 $routeResults = (array)$route->getRoutePoints($params);
32 32
 
33 33
 if (isset($routeResults['addresses'])) {
34
-    foreach ($routeResults['addresses'] as $key => $address) {
35
-        $araddress = (array)$address;
34
+	foreach ($routeResults['addresses'] as $key => $address) {
35
+		$araddress = (array)$address;
36 36
 
37
-        if (isset($araddress['route_destination_id'])) echo "route_destination_id=".$araddress['route_destination_id']."<br>";
37
+		if (isset($araddress['route_destination_id'])) echo "route_destination_id=".$araddress['route_destination_id']."<br>";
38 38
         
39
-        if (isset($araddress['path_to_next'])) {
40
-            echo "path_to_next:<br>";
41
-            Route4Me::simplePrint((array)$araddress['path_to_next']);
42
-        }
39
+		if (isset($araddress['path_to_next'])) {
40
+			echo "path_to_next:<br>";
41
+			Route4Me::simplePrint((array)$araddress['path_to_next']);
42
+		}
43 43
         
44
-        echo "<br>";
45
-    }
44
+		echo "<br>";
45
+	}
46 46
 }
Please login to merge, or discard this patch.
examples/Routes/GetRouteDirections.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@
 block discarded – undo
23 23
   
24 24
 // Get a route with the directions
25 25
 $params = array(
26
-    "directions" => 1,
27
-    "route_id"   => $route_id
26
+	"directions" => 1,
27
+	"route_id"   => $route_id
28 28
 );
29 29
 
30 30
 $routeResults = (array)$route->getRoutePoints($params);
Please login to merge, or discard this patch.
src/Route4Me/Track.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,16 +7,16 @@
 block discarded – undo
7 7
 
8 8
 class Track extends Common
9 9
 {
10
-    public static function set(TrackSetParams $params)
11
-    {
12
-        $allQueryFields = Route4Me::getObjectProperties(new TrackSetParams(), array('tx_id'));
10
+	public static function set(TrackSetParams $params)
11
+	{
12
+		$allQueryFields = Route4Me::getObjectProperties(new TrackSetParams(), array('tx_id'));
13 13
 
14
-        $json = Route4Me::makeRequst(array(
15
-            'url'    => Endpoint::TRACK_SET,
16
-            'method' => 'GET',
17
-            'query'  => Route4Me::generateRequestParameters($allQueryFields, $params)
18
-        ));
14
+		$json = Route4Me::makeRequst(array(
15
+			'url'    => Endpoint::TRACK_SET,
16
+			'method' => 'GET',
17
+			'query'  => Route4Me::generateRequestParameters($allQueryFields, $params)
18
+		));
19 19
 
20
-        return $json;
21
-    }
20
+		return $json;
21
+	}
22 22
 }
Please login to merge, or discard this patch.
src/Route4Me/Territory.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	
41 41
 	public static function getTerritory($params)
42 42
 	{
43
-	    $allQueryFields = array('territory_id', 'addresses');
43
+		$allQueryFields = array('territory_id', 'addresses');
44 44
         
45 45
 		$territory = Route4Me::makeRequst(array(
46 46
 			'url'    => Endpoint::TERRITORY_V4,
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	
54 54
 	public static function getTerritories($params)
55 55
 	{
56
-	    $allQueryFields = array('offset', 'limit', 'addresses');
56
+		$allQueryFields = array('offset', 'limit', 'addresses');
57 57
         
58 58
 		$response = Route4Me::makeRequst(array(
59 59
 			'url'    => Endpoint::TERRITORY_V4,
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
 	public static function addTerritory($params)
68 68
 	{
69
-	    $allBodyFields = array('territory_name', 'member_id', 'territory_color', 'territory');
69
+		$allBodyFields = array('territory_name', 'member_id', 'territory_color', 'territory');
70 70
         
71 71
 		$response = Route4Me::makeRequst(array(
72 72
 			'url'    => Endpoint::TERRITORY_V4,
@@ -92,14 +92,14 @@  discard block
 block discarded – undo
92 92
 	
93 93
 	public function updateTerritory($params)
94 94
 	{
95
-	    $allQueryFields = array('territory_id');
96
-        $allBodyFields = array('territory_name', 'member_id', 'territory_color', 'territory');
95
+		$allQueryFields = array('territory_id');
96
+		$allBodyFields = array('territory_name', 'member_id', 'territory_color', 'territory');
97 97
         
98 98
 		$response = Route4Me::makeRequst(array(
99 99
 			'url'    => Endpoint::TERRITORY_V4,
100 100
 			'method' => 'PUT',
101 101
 			'query'  => Route4Me::generateRequestParameters($allQueryFields, $params),
102
-            'body'   => Route4Me::generateRequestParameters($allBodyFields, $params)
102
+			'body'   => Route4Me::generateRequestParameters($allBodyFields, $params)
103 103
 		));
104 104
 
105 105
 		return $response;
Please login to merge, or discard this patch.
src/Route4Me/Vehicle.php 1 patch
Indentation   +130 added lines, -130 removed lines patch added patch discarded remove patch
@@ -6,157 +6,157 @@
 block discarded – undo
6 6
 
7 7
 class Vehicle extends Common
8 8
 {
9
-    public $vehicle_id;
10
-    public $member_id;
11
-    public $is_deleted;
12
-    public $vehicle_alias;
13
-    public $vehicle_vin;
14
-    public $vehicle_reg_state_id;
15
-    public $vehicle_reg_country_id;
16
-    public $vehicle_license_plate;
17
-    public $vehicle_type_id;
18
-    public $vehicle_make;
19
-    public $vehicle_model_year;
20
-    public $vehicle_model;
21
-    public $vehicle_year_acquired;
22
-    public $vehicle_cost_new;
23
-    public $purchased_new;
24
-    public $license_start_date;
25
-    public $license_end_date;
26
-    public $vehicle_axle_count;
27
-    public $is_operational;
28
-    public $mpg_city;
29
-    public $mpg_highway;
30
-    public $fuel_type;
31
-    public $height_inches;
32
-    public $weight_lb;
33
-    public $external_telematics_vehicle_id;
34
-    public $has_trailer;
35
-    public $heightInInches;
36
-    public $lengthInInches;
37
-    public $widthInInches;
38
-    public $maxWeightPerAxleGroupInPounds;
39
-    public $numAxles;
40
-    public $weightInPounds;
41
-    public $HazmatType;
42
-    public $LowEmissionZonePref;
43
-    public $Use53FootTrailerRouting;
44
-    public $UseNationalNetwork;
45
-    public $UseTruckRestrictions;
46
-    public $AvoidFerries;
47
-    public $DividedHighwayAvoidPreference;
48
-    public $FreewayAvoidPreference;
49
-    public $InternationalBordersOpen;
50
-    public $TollRoadUsage;
51
-    public $hwy_only;
52
-    public $long_combination_vehicle;
53
-    public $avoid_highways;
54
-    public $side_street_adherence;
55
-    public $truck_config;
56
-    public $height_metric;
57
-    public $length_metric;
58
-    public $width_metric;
59
-    public $weight_metric;
60
-    public $max_weight_per_axle_group_metric;
9
+	public $vehicle_id;
10
+	public $member_id;
11
+	public $is_deleted;
12
+	public $vehicle_alias;
13
+	public $vehicle_vin;
14
+	public $vehicle_reg_state_id;
15
+	public $vehicle_reg_country_id;
16
+	public $vehicle_license_plate;
17
+	public $vehicle_type_id;
18
+	public $vehicle_make;
19
+	public $vehicle_model_year;
20
+	public $vehicle_model;
21
+	public $vehicle_year_acquired;
22
+	public $vehicle_cost_new;
23
+	public $purchased_new;
24
+	public $license_start_date;
25
+	public $license_end_date;
26
+	public $vehicle_axle_count;
27
+	public $is_operational;
28
+	public $mpg_city;
29
+	public $mpg_highway;
30
+	public $fuel_type;
31
+	public $height_inches;
32
+	public $weight_lb;
33
+	public $external_telematics_vehicle_id;
34
+	public $has_trailer;
35
+	public $heightInInches;
36
+	public $lengthInInches;
37
+	public $widthInInches;
38
+	public $maxWeightPerAxleGroupInPounds;
39
+	public $numAxles;
40
+	public $weightInPounds;
41
+	public $HazmatType;
42
+	public $LowEmissionZonePref;
43
+	public $Use53FootTrailerRouting;
44
+	public $UseNationalNetwork;
45
+	public $UseTruckRestrictions;
46
+	public $AvoidFerries;
47
+	public $DividedHighwayAvoidPreference;
48
+	public $FreewayAvoidPreference;
49
+	public $InternationalBordersOpen;
50
+	public $TollRoadUsage;
51
+	public $hwy_only;
52
+	public $long_combination_vehicle;
53
+	public $avoid_highways;
54
+	public $side_street_adherence;
55
+	public $truck_config;
56
+	public $height_metric;
57
+	public $length_metric;
58
+	public $width_metric;
59
+	public $weight_metric;
60
+	public $max_weight_per_axle_group_metric;
61 61
     
62
-    public function __construct () 
63
-    {
64
-        Route4Me::setBaseUrl(Endpoint::WH_BASE_URL);
65
-    }
62
+	public function __construct () 
63
+	{
64
+		Route4Me::setBaseUrl(Endpoint::WH_BASE_URL);
65
+	}
66 66
     
67
-    public static function fromArray(array $params) {
68
-        $vehicle= new Vehicle();
69
-        foreach($params as $key => $value) {
70
-            if (property_exists($vehicle, $key)) {
71
-                $vehicle->{$key} = $value;
72
-            }
73
-        }
67
+	public static function fromArray(array $params) {
68
+		$vehicle= new Vehicle();
69
+		foreach($params as $key => $value) {
70
+			if (property_exists($vehicle, $key)) {
71
+				$vehicle->{$key} = $value;
72
+			}
73
+		}
74 74
         
75
-        return $vehicle;
76
-    }
75
+		return $vehicle;
76
+	}
77 77
     
78
-    public static function getVehicles($params)
79
-    {
80
-        $allQueryFields = array('with_pagination', 'page', 'perPage');
78
+	public static function getVehicles($params)
79
+	{
80
+		$allQueryFields = array('with_pagination', 'page', 'perPage');
81 81
         
82
-        $response = Route4Me::makeRequst(array(
83
-            'url'    => Endpoint::VEHICLE_V4,
84
-            'method' => 'GET',
85
-            'query'  => Route4Me::generateRequestParameters($allQueryFields, $params)
86
-        ));
82
+		$response = Route4Me::makeRequst(array(
83
+			'url'    => Endpoint::VEHICLE_V4,
84
+			'method' => 'GET',
85
+			'query'  => Route4Me::generateRequestParameters($allQueryFields, $params)
86
+		));
87 87
 
88
-        return $response;
89
-    }
88
+		return $response;
89
+	}
90 90
     
91
-    public function getRandomVehicleId($page,$perPage)
92
-    {
93
-        $params = array(
94
-            'page'             => isset($page) ? $page : 1,
95
-            'perPage'          => isset($perPage) ? $perPage : 10,
96
-            'with_pagination'  => true
97
-        );
91
+	public function getRandomVehicleId($page,$perPage)
92
+	{
93
+		$params = array(
94
+			'page'             => isset($page) ? $page : 1,
95
+			'perPage'          => isset($perPage) ? $perPage : 10,
96
+			'with_pagination'  => true
97
+		);
98 98
         
99
-        $vehicles = $this->getVehicles($params);
99
+		$vehicles = $this->getVehicles($params);
100 100
 
101
-        if (is_null($vehicles)) return null;
102
-        if (!isset($vehicles['data'])) return null;
103
-        if (sizeof($vehicles['data'])<1) return null;
101
+		if (is_null($vehicles)) return null;
102
+		if (!isset($vehicles['data'])) return null;
103
+		if (sizeof($vehicles['data'])<1) return null;
104 104
         
105
-        $randomIndex = rand(0, sizeof($vehicles['data'])-1);
105
+		$randomIndex = rand(0, sizeof($vehicles['data'])-1);
106 106
         
107
-        return $vehicles['data'][$randomIndex]['vehicle_id'];
108
-    }
107
+		return $vehicles['data'][$randomIndex]['vehicle_id'];
108
+	}
109 109
     
110
-    public function getVehicleByID($vehicleID)
111
-    {
112
-        $response = Route4Me::makeRequst(array(
113
-            'url'    => Endpoint::VEHICLE_V4 . '/' . $vehicleID,
114
-            'method' => 'GET'
115
-        ));
110
+	public function getVehicleByID($vehicleID)
111
+	{
112
+		$response = Route4Me::makeRequst(array(
113
+			'url'    => Endpoint::VEHICLE_V4 . '/' . $vehicleID,
114
+			'method' => 'GET'
115
+		));
116 116
 
117
-        return $response;
118
-    }
117
+		return $response;
118
+	}
119 119
     
120
-    public function updateVehicle($params)
121
-    {
122
-        $vehicleID = isset($params->vehicle_id) ? $params->vehicle_id : null;
120
+	public function updateVehicle($params)
121
+	{
122
+		$vehicleID = isset($params->vehicle_id) ? $params->vehicle_id : null;
123 123
         
124
-        $allBodyFields = Route4Me::getObjectProperties(new Vehicle(), array('vehicle_id'));
124
+		$allBodyFields = Route4Me::getObjectProperties(new Vehicle(), array('vehicle_id'));
125 125
         
126
-        $response = Route4Me::makeRequst(array(
127
-            'url'    => Endpoint::VEHICLE_V4 . '/' . $vehicleID,
128
-            'method' => 'PUT',
129
-            'body'   => Route4Me::generateRequestParameters($allBodyFields, $params),
130
-            'HTTPHEADER'  => 'Content-Type: application/json'
131
-        ));
126
+		$response = Route4Me::makeRequst(array(
127
+			'url'    => Endpoint::VEHICLE_V4 . '/' . $vehicleID,
128
+			'method' => 'PUT',
129
+			'body'   => Route4Me::generateRequestParameters($allBodyFields, $params),
130
+			'HTTPHEADER'  => 'Content-Type: application/json'
131
+		));
132 132
 
133
-        return $response;
134
-    }
133
+		return $response;
134
+	}
135 135
     
136
-    public function createVehicle($params)
137
-    {
138
-        $allBodyFields = Route4Me::getObjectProperties(new Vehicle(), array('vehicle_id'));
136
+	public function createVehicle($params)
137
+	{
138
+		$allBodyFields = Route4Me::getObjectProperties(new Vehicle(), array('vehicle_id'));
139 139
         
140
-        $response = Route4Me::makeRequst(array(
141
-            'url'    => Endpoint::VEHICLE_V4,
142
-            'method' => 'POST',
143
-            'body'   => Route4Me::generateRequestParameters($allBodyFields, $params),
144
-            'HTTPHEADER'  => 'Content-Type: application/json'
145
-        ));
140
+		$response = Route4Me::makeRequst(array(
141
+			'url'    => Endpoint::VEHICLE_V4,
142
+			'method' => 'POST',
143
+			'body'   => Route4Me::generateRequestParameters($allBodyFields, $params),
144
+			'HTTPHEADER'  => 'Content-Type: application/json'
145
+		));
146 146
 
147
-        return $response;
148
-    }
147
+		return $response;
148
+	}
149 149
     
150
-    public function removeVehicle($params)
151
-    {
152
-        $vehicleID = isset($params->vehicle_id) ? $params->vehicle_id : null;
150
+	public function removeVehicle($params)
151
+	{
152
+		$vehicleID = isset($params->vehicle_id) ? $params->vehicle_id : null;
153 153
         
154
-        $response = Route4Me::makeRequst(array(
155
-            'url'    => Endpoint::VEHICLE_V4 . '/' . $vehicleID,
156
-            'method' => 'DELETE',
157
-            'HTTPHEADER'  => 'Content-Type: application/json'
158
-        ));
154
+		$response = Route4Me::makeRequst(array(
155
+			'url'    => Endpoint::VEHICLE_V4 . '/' . $vehicleID,
156
+			'method' => 'DELETE',
157
+			'HTTPHEADER'  => 'Content-Type: application/json'
158
+		));
159 159
 
160
-        return $response;
161
-    }
160
+		return $response;
161
+	}
162 162
 }
Please login to merge, or discard this patch.