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
Pull Request — master (#2)
by
unknown
07:12
created
examples/Addresses/AddDestinationToOptimization.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	namespace Route4Me;
3 3
 	
4
-	$vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/';
4
+	$vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/';
5 5
 
6 6
     require $vdir.'/../vendor/autoload.php';
7 7
 	
@@ -14,9 +14,9 @@  discard block
 block discarded – undo
14 14
 	
15 15
 	// Get random route from test routes
16 16
 	//--------------------------------------------------------
17
-	$route=new Route();
17
+	$route = new Route();
18 18
 	
19
-	$route_id=$route->getRandomRouteId(0, 10);
19
+	$route_id = $route->getRandomRouteId(0, 10);
20 20
 	
21 21
 	if (is_null($route_id)) {
22 22
 		echo "can't retrieve random route_id!.. Try again.";
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 	
27 27
 	// Get random address's id from selected route above
28 28
 	//--------------------------------------------------------
29
-	$addressRand=(array)$route->GetRandomAddressFromRoute($route_id);
30
-	$optimization_problem_id=$addressRand['optimization_problem_id'];
29
+	$addressRand = (array)$route->GetRandomAddressFromRoute($route_id);
30
+	$optimization_problem_id = $addressRand['optimization_problem_id'];
31 31
 	
32 32
 	if (is_null($optimization_problem_id)) {
33 33
 		echo "can't retrieve random address!.. Try again.";
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	}
36 36
 	//--------------------------------------------------------
37 37
 	
38
-	$addresses=array();
38
+	$addresses = array();
39 39
 	
40
-	$address1=(array)Address::fromArray(array(
40
+	$address1 = (array)Address::fromArray(array(
41 41
 		'address' 	=>	'717 5th Ave New York, NY 10021',
42 42
 		'alias'		=>	'Giorgio Armani',
43 43
 		'lat'		=>	40.7669692,
@@ -45,17 +45,17 @@  discard block
 block discarded – undo
45 45
 		'time'		=>	0
46 46
 	));
47 47
 
48
-	$addresses[0]=$address1;
48
+	$addresses[0] = $address1;
49 49
 	
50
-	$OptimizationParameters=(array)OptimizationProblem::fromArray(array(
50
+	$OptimizationParameters = (array)OptimizationProblem::fromArray(array(
51 51
 		"optimization_problem_id"	=> $optimization_problem_id,
52 52
 		"addresses"		=> $addresses,
53 53
 		"reoptimize"	=> 1,
54 54
 	));
55 55
 	
56
-	$optimizationproblem=new OptimizationProblem();
56
+	$optimizationproblem = new OptimizationProblem();
57 57
 	
58
-	$result=$optimizationproblem->update($OptimizationParameters);
58
+	$result = $optimizationproblem->update($OptimizationParameters);
59 59
 	
60 60
 	Route4Me::simplePrint($result);
61 61
 ?>
62 62
\ No newline at end of file
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 	
4 4
 	$vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/';
5 5
 
6
-    require $vdir.'/../vendor/autoload.php';
6
+	require $vdir.'/../vendor/autoload.php';
7 7
 	
8 8
 	use Route4Me\Route4Me;
9 9
 	use Route4Me\Route;
Please login to merge, or discard this patch.
examples/Addresses/insert_address_into_route_optimal_position.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	namespace Route4Me;
3 3
 	
4
-	$vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/';
4
+	$vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/';
5 5
 
6 6
     require $vdir.'/../vendor/autoload.php';
7 7
 	
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
 	
16 16
 	// Get random route from test routes
17 17
 	//--------------------------------------------------------
18
-	$route=new Route();
18
+	$route = new Route();
19 19
 	
20
-	$route_id=$route->getRandomRouteId(0, 10);
20
+	$route_id = $route->getRandomRouteId(0, 10);
21 21
 	
22 22
 	if (is_null($route_id)) {
23 23
 		echo "can't retrieve random route_id!.. Try again.";
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 	}
26 26
 	//--------------------------------------------------------
27 27
 	
28
-	$addresses=array();
28
+	$addresses = array();
29 29
 	
30
-	$params=array(
30
+	$params = array(
31 31
 		"route_id" => "5C15E83A4BE005BCD1537955D28D51D7",
32 32
 		"addresses" => array(
33 33
 			"0" => array(
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 		"optimal_position" => true
45 45
 	);
46 46
 	
47
-	$route1=new Route();
47
+	$route1 = new Route();
48 48
 	
49
-	$result=$route1->insertAddressOptimalPosition($params);
49
+	$result = $route1->insertAddressOptimalPosition($params);
50 50
 	
51 51
 	Route4Me::simplePrint((array)$result);
52 52
 ?>
53 53
\ No newline at end of file
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 	
4 4
 	$vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/';
5 5
 
6
-    require $vdir.'/../vendor/autoload.php';
6
+	require $vdir.'/../vendor/autoload.php';
7 7
 	
8 8
 	use Route4Me\Route4Me;
9 9
 	use Route4Me\Route;
Please login to merge, or discard this patch.
examples/Addresses/mark_address_as_departed.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	namespace Route4Me;
3 3
 	
4
-	$vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/';
4
+	$vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/';
5 5
 
6 6
     require $vdir.'/../vendor/autoload.php';
7 7
 	
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 	// Set the api key in the Route4Me class
12 12
 	Route4Me::setApiKey('11111111111111111111111111111111');
13 13
 	
14
-	$address=new Address();
14
+	$address = new Address();
15 15
 	
16 16
 	$params = array(
17 17
 		"route_id"  => "5C15E83A4BE005BCD1537955D28D51D7",
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 		"member_id"  => 1
21 21
 	);
22 22
 	
23
-	$result=$address->markAsDeparted($params);
23
+	$result = $address->markAsDeparted($params);
24 24
 	
25 25
 	var_dump($result); 
26 26
 ?>
27 27
\ No newline at end of file
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 	
4 4
 	$vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/';
5 5
 
6
-    require $vdir.'/../vendor/autoload.php';
6
+	require $vdir.'/../vendor/autoload.php';
7 7
 	
8 8
 	use Route4Me\Route4Me;
9 9
 	use Route4Me\Address;
Please login to merge, or discard this patch.
examples/Addresses/GetAddress.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	namespace Route4Me;
3 3
 	
4
-	$vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/';
4
+	$vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/';
5 5
 
6 6
     require $vdir.'/../vendor/autoload.php';
7 7
 	
@@ -13,9 +13,9 @@  discard block
 block discarded – undo
13 13
 	
14 14
 	// Get random route from test routes
15 15
 	//--------------------------------------------------------
16
-	$route=new Route();
16
+	$route = new Route();
17 17
 	
18
-	$route_id=$route->getRandomRouteId(0, 10);
18
+	$route_id = $route->getRandomRouteId(0, 10);
19 19
 	
20 20
 	if (is_null($route_id)) {
21 21
 		echo "can't retrieve random route_id!.. Try again.";
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
 	
26 26
 	// Get random address's id from selected route above
27 27
 	//--------------------------------------------------------
28
-	$addressRand=(array)$route->GetRandomAddressFromRoute($route_id);
29
-	$route_destination_id=$addressRand['route_destination_id'];
28
+	$addressRand = (array)$route->GetRandomAddressFromRoute($route_id);
29
+	$route_destination_id = $addressRand['route_destination_id'];
30 30
 	
31 31
 	if (is_null($route_destination_id)) {
32 32
 		echo "can't retrieve random address!.. Try again.";
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
 	}
35 35
 	//--------------------------------------------------------
36 36
 	
37
-	$address=new Address();
37
+	$address = new Address();
38 38
 	
39
-	$addressRetrieved=$address->getAddress($route_id, $route_destination_id);
39
+	$addressRetrieved = $address->getAddress($route_id, $route_destination_id);
40 40
 	
41 41
 	Route4Me::simplePrint((array)$addressRetrieved);
42 42
 ?>
43 43
\ No newline at end of file
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 	
4 4
 	$vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/';
5 5
 
6
-    require $vdir.'/../vendor/autoload.php';
6
+	require $vdir.'/../vendor/autoload.php';
7 7
 	
8 8
 	use Route4Me\Route4Me;
9 9
 	use Route4Me\Route;
Please login to merge, or discard this patch.
examples/Tracking/TrackDeviceLastLocationHistory.php 3 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,16 +15,16 @@
 block discarded – undo
15 15
 	Route4Me::setApiKey('11111111111111111111111111111111');
16 16
 	
17 17
 	$params = TrackSetParams::fromArray(array(
18
-	    'format'           => Format::SERIALIZED,
19
-	    'route_id'         => '8B4E277A54990986CD80BE36977517E2',
20
-	    'member_id'        => 1,
21
-	    'course'           => 3,
22
-	    'speed'            => 100,
23
-	    'lat'              => 41.8927521,
24
-	    'lng'              => -109.0803888,
25
-	    'device_type'      => DeviceType::IPHONE,
26
-	    'device_guid'      => 'qweqweqwe',
27
-	    'device_timestamp' => date('Y-m-d H:i:s')
18
+		'format'           => Format::SERIALIZED,
19
+		'route_id'         => '8B4E277A54990986CD80BE36977517E2',
20
+		'member_id'        => 1,
21
+		'course'           => 3,
22
+		'speed'            => 100,
23
+		'lat'              => 41.8927521,
24
+		'lng'              => -109.0803888,
25
+		'device_type'      => DeviceType::IPHONE,
26
+		'device_guid'      => 'qweqweqwe',
27
+		'device_timestamp' => date('Y-m-d H:i:s')
28 28
 	));
29 29
 
30 30
 	$status = Track::set($params);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 	namespace Route4Me;
3 3
 		
4
-	$vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/';
4
+	$vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/';
5 5
 	
6 6
 	require $vdir.'/../vendor/autoload.php';
7 7
 	//require __DIR__.'/../vendor/autoload.php';;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,9 +43,10 @@
 block discarded – undo
43 43
 	
44 44
 	$result = $route->GetLastLocation($params);
45 45
 	//var_dump($result);die("");
46
-	if (isset($result->tracking_history))
47
-	foreach ($result->tracking_history as $history) {
46
+	if (isset($result->tracking_history)) {
47
+		foreach ($result->tracking_history as $history) {
48 48
 		echo "Speed --> ".$history['s']."<br>";
49
+	}
49 50
 		echo "course --> ".$history['d']."<br>";
50 51
 		echo "Timestamp --> ".$history['ts_friendly']."<br>";
51 52
 		echo "Latitude --> ".$history['lt']."<br>";
Please login to merge, or discard this patch.
examples/Tracking/SetGPSPosition.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@
 block discarded – undo
12 12
 use Route4Me\Track;
13 13
 
14 14
 $params = TrackSetParams::fromArray(array(
15
-    'format'           => Format::CSV,
16
-    'route_id'         => 'AC16E7D338B551013FF34266FE81A5EE',
17
-    'member_id'        => 1,
18
-    'course'           => 1,
19
-    'speed'            => 120,
20
-    'lat'              => 41.8927521,
21
-    'lng'              => -109.0803888,
22
-    'device_type'      => DeviceType::IPHONE,
23
-    'device_guid'      => 'qweqweqwe',
24
-    'device_timestamp' => date('Y-m-d H:i:s')
15
+	'format'           => Format::CSV,
16
+	'route_id'         => 'AC16E7D338B551013FF34266FE81A5EE',
17
+	'member_id'        => 1,
18
+	'course'           => 1,
19
+	'speed'            => 120,
20
+	'lat'              => 41.8927521,
21
+	'lng'              => -109.0803888,
22
+	'device_type'      => DeviceType::IPHONE,
23
+	'device_guid'      => 'qweqweqwe',
24
+	'device_timestamp' => date('Y-m-d H:i:s')
25 25
 ));
26 26
 
27 27
 $status = Track::set($params);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace Route4Me;
3 3
 	
4
-$vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/';
4
+$vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/';
5 5
 
6 6
 require $vdir.'/../vendor/autoload.php';
7 7
 //require __DIR__.'/../vendor/autoload.php';;
Please login to merge, or discard this patch.
src/Route4Me/Track.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -7,20 +7,20 @@
 block discarded – undo
7 7
 
8 8
 class Track extends Common
9 9
 {
10
-    public static $apiUrl = '/track/set.php';
10
+	public static $apiUrl = '/track/set.php';
11 11
 
12
-    public static function set(TrackSetParams $param)
13
-    {
14
-        $query = array_merge($param->toArray(), array(
15
-            'api_key' => Route4Me::getApiKey()
16
-        ));
12
+	public static function set(TrackSetParams $param)
13
+	{
14
+		$query = array_merge($param->toArray(), array(
15
+			'api_key' => Route4Me::getApiKey()
16
+		));
17 17
 
18
-        $json = Route4Me::makeRequst(array(
19
-            'url'    => self::$apiUrl,
20
-            'method' => 'GET',
21
-            'query'  => $query
22
-        ));
18
+		$json = Route4Me::makeRequst(array(
19
+			'url'    => self::$apiUrl,
20
+			'method' => 'GET',
21
+			'query'  => $query
22
+		));
23 23
 
24
-        return $json['status'];
25
-    }
24
+		return $json['status'];
25
+	}
26 26
 }
Please login to merge, or discard this patch.
src/Route4Me/Enum/Avoid.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 class Avoidance
6 6
 {
7
-    const HIGHWAYS = 'Highways';
8
-    const TOLLS = 'Tolls';
9
-    const MINIMIZE_HIGHWAYS = 'minimizeHighways';
10
-    const MINIMIZE_TOLLS = 'minimizeTolls';
7
+	const HIGHWAYS = 'Highways';
8
+	const TOLLS = 'Tolls';
9
+	const MINIMIZE_HIGHWAYS = 'minimizeHighways';
10
+	const MINIMIZE_TOLLS = 'minimizeTolls';
11 11
 }
Please login to merge, or discard this patch.
src/Route4Me/Enum/OptimizationType.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 class OptimizationType
6 6
 {
7
-    const DISTANCE = 'Distance';
8
-    const TIME = 'Time';
9
-    const TIME_WITH_TRAFFIC = 'timeWithTraffic';
7
+	const DISTANCE = 'Distance';
8
+	const TIME = 'Time';
9
+	const TIME_WITH_TRAFFIC = 'timeWithTraffic';
10 10
 }
Please login to merge, or discard this patch.