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 ( 84c959...e5b8eb )
by Igor
10:00 queued 12s
created
examples/AddressBook/SearchTextSpecifiedFields.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@
 block discarded – undo
16 16
 // Example refers to the process of searching for text and specifing returned fields.
17 17
 
18 18
 $params = [
19
-    'query'     => 'David',
20
-    'fields'    => 'first_name,address_email',
21
-    'offset'    => 0,
22
-    'limit'     => 5,
19
+	'query'     => 'David',
20
+	'fields'    => 'first_name,address_email',
21
+	'offset'    => 0,
22
+	'limit'     => 5,
23 23
 ];
24 24
 
25 25
 $abcResult = $abLocation->searchAddressBookLocations($params);
Please login to merge, or discard this patch.
examples/AddressBook/GetAddressBookLocationsByIDs.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 // Get two random locations IDs
12 12
 
13 13
 $addressBookLocationParameters = [
14
-    'limit'     => 30,
15
-    'offset'    => 0,
14
+	'limit'     => 30,
15
+	'offset'    => 0,
16 16
 ];
17 17
 
18 18
 $abContacts = new AddressBookLocation();
@@ -36,6 +36,6 @@  discard block
 block discarded – undo
36 36
 $results = $abLocation->getValue($abcResult, 'results');
37 37
 
38 38
 foreach ($results as $result) {
39
-    Route4Me::simplePrint($result);
40
-    echo '<br>';
39
+	Route4Me::simplePrint($result);
40
+	echo '<br>';
41 41
 }
Please login to merge, or discard this patch.
examples/AddressBook/AddressBookLocationSearch.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,10 +13,10 @@
 block discarded – undo
13 13
 $abLocation = new AddressBookLocation();
14 14
 
15 15
 $params = [
16
-    'query'     => 'Test',
17
-    'fields'    => 'address_1,address_group,first_name,last_name',
18
-    'offset'    => 0,
19
-    'limit'     => 20,
16
+	'query'     => 'Test',
17
+	'fields'    => 'address_1,address_group,first_name,last_name',
18
+	'offset'    => 0,
19
+	'limit'     => 20,
20 20
 ];
21 21
 
22 22
 $abcResult = $abLocation->searchAddressBookLocations($params);
Please login to merge, or discard this patch.
examples/AdvancedConstraints/DriversScheduleswithTerritoriesV4.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -27,15 +27,15 @@  discard block
 block discarded – undo
27 27
 //**********************************************************************
28 28
 // General Route Parameters
29 29
 $parameters = RouteParameters::fromArray([
30
-    'rt' => true,
31
-    'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
32
-    'route_name' => 'Drivers Schedules - 3 Territories '.date('Y-m-d H:i:s', time()),
33
-    'distance_unit' => DistanceUnit::MILES,
34
-    'device_type' => DeviceType::WEB,
35
-    'optimize' => OptimizationType::DISTANCE,
36
-    'travel_mode' => TravelMode::DRIVING,
37
-    'parts' => 10,
38
-    'advanced_constraints' => []
30
+	'rt' => true,
31
+	'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
32
+	'route_name' => 'Drivers Schedules - 3 Territories '.date('Y-m-d H:i:s', time()),
33
+	'distance_unit' => DistanceUnit::MILES,
34
+	'device_type' => DeviceType::WEB,
35
+	'optimize' => OptimizationType::DISTANCE,
36
+	'travel_mode' => TravelMode::DRIVING,
37
+	'parts' => 10,
38
+	'advanced_constraints' => []
39 39
 ]);
40 40
 
41 41
 //**********************************************************************
@@ -48,27 +48,27 @@  discard block
 block discarded – undo
48 48
 // Time Window Start:  8:00 am EST
49 49
 // Time Window End:   11:00 am EST
50 50
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
51
-    'tags' => $zones[0],
52
-    '$members_count' => 3,
53
-    'available_time_windows' => [[(8 + 5) * 3600 , (11 + 5) * 3600]]
51
+	'tags' => $zones[0],
52
+	'$members_count' => 3,
53
+	'available_time_windows' => [[(8 + 5) * 3600 , (11 + 5) * 3600]]
54 54
 ]);
55 55
 
56 56
 // Schedule 2
57 57
 // Time Window Start:  8:00 am EST
58 58
 // Time Window End:   12:00 pm EST
59 59
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
60
-    'tags' => $zones[1],
61
-    '$members_count' => 3,
62
-    'available_time_windows' => [[(8 + 5) * 3600 , (12 + 5) * 3600]]
60
+	'tags' => $zones[1],
61
+	'$members_count' => 3,
62
+	'available_time_windows' => [[(8 + 5) * 3600 , (12 + 5) * 3600]]
63 63
 ]);
64 64
 
65 65
 // Schedule 3
66 66
 // Time Window Start:  8:00 am EST
67 67
 // Time Window End:   01:00 pm EST
68 68
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
69
-    'tags' => $zones[2],
70
-    '$members_count' => 3,
71
-    'available_time_windows' => [[(8 + 5) * 3600 , (13 + 5) * 3600]]
69
+	'tags' => $zones[2],
70
+	'$members_count' => 3,
71
+	'available_time_windows' => [[(8 + 5) * 3600 , (13 + 5) * 3600]]
72 72
 ]);
73 73
 
74 74
 //**********************************************************************
@@ -77,23 +77,23 @@  discard block
 block discarded – undo
77 77
 
78 78
 // Depot
79 79
 $addresses[] = Address::fromArray([
80
-    'address' => 'DEPOT',
81
-    'is_depot' => true,
82
-    'lat' => 25.694341,
83
-    'lng' => -80.166036,
84
-    'time' => 0
80
+	'address' => 'DEPOT',
81
+	'is_depot' => true,
82
+	'lat' => 25.694341,
83
+	'lng' => -80.166036,
84
+	'time' => 0
85 85
 ]);
86 86
 
87 87
 // Stops
88 88
 foreach ($json as $address) {
89
-    $addresses[] = Address::fromArray([
90
-        'address' => $address['address'],
91
-        'is_depot' => false,
92
-        'lat' => $address['lat'],
93
-        'lng' => $address['lng'],
94
-        'time' => 300,
95
-        'tags' => $address['tags']
96
-    ]);
89
+	$addresses[] = Address::fromArray([
90
+		'address' => $address['address'],
91
+		'is_depot' => false,
92
+		'lat' => $address['lat'],
93
+		'lng' => $address['lng'],
94
+		'time' => 300,
95
+		'tags' => $address['tags']
96
+	]);
97 97
 }
98 98
 
99 99
 $optimizationParams = new OptimizationProblemParams();
@@ -108,6 +108,6 @@  discard block
 block discarded – undo
108 108
 echo "Routes:" . PHP_EOL;
109 109
 foreach($problem->routes as $route)
110 110
 {
111
-    echo "\tID: " . $route->route_id . PHP_EOL;
112
-    echo "\tDistance: " . $route->trip_distance . PHP_EOL;
111
+	echo "\tID: " . $route->route_id . PHP_EOL;
112
+	echo "\tDistance: " . $route->trip_distance . PHP_EOL;
113 113
 }
Please login to merge, or discard this patch.
examples/AdvancedConstraints/TagsDifferentTimeWindowsFleets.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -23,18 +23,18 @@  discard block
 block discarded – undo
23 23
 //**********************************************************************
24 24
 // General Route Parameters
25 25
 $parameters = RouteParameters::fromArray([
26
-    'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
27
-    'route_name' => 'Fleet Example - Single Depot, Multiple Driver '.date('Y-m-d H:i:s', time()),
28
-    'route_time' => 0,
29
-    'vehicle_capacity' => 100,
30
-    'vehicle_max_distance_mi' => 10000,
31
-    'route_max_duration' => 86400,
32
-    'parts' => 20,
33
-    'distance_unit' => DistanceUnit::MILES,
34
-    'device_type' => DeviceType::WEB,
35
-    'optimize' => OptimizationType::DISTANCE,
36
-    'travel_mode' => TravelMode::DRIVING,
37
-    'advanced_constraints' => [] 
26
+	'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
27
+	'route_name' => 'Fleet Example - Single Depot, Multiple Driver '.date('Y-m-d H:i:s', time()),
28
+	'route_time' => 0,
29
+	'vehicle_capacity' => 100,
30
+	'vehicle_max_distance_mi' => 10000,
31
+	'route_max_duration' => 86400,
32
+	'parts' => 20,
33
+	'distance_unit' => DistanceUnit::MILES,
34
+	'device_type' => DeviceType::WEB,
35
+	'optimize' => OptimizationType::DISTANCE,
36
+	'travel_mode' => TravelMode::DRIVING,
37
+	'advanced_constraints' => [] 
38 38
 ]);
39 39
 
40 40
 //**********************************************************************
@@ -43,22 +43,22 @@  discard block
 block discarded – undo
43 43
 // Time Window Start:  2:00 am EST
44 44
 // Time Window End:   15:50 am EST
45 45
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
46
-    'max_cargo_volume' =>  0.0,
47
-    'max_capacity' =>  200,
48
-    'members_count' =>  10,
49
-    'available_time_windows' => [[25200, 75000]],
50
-    'tags' => ['TAG001', 'TAG002']
46
+	'max_cargo_volume' =>  0.0,
47
+	'max_capacity' =>  200,
48
+	'members_count' =>  10,
49
+	'available_time_windows' => [[25200, 75000]],
50
+	'tags' => ['TAG001', 'TAG002']
51 51
 ]);
52 52
 
53 53
 // Schedule 2
54 54
 // Time Window Start:  7:33 am EST
55 55
 // Time Window End:   21:23 am EST
56 56
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
57
-    'max_cargo_volume' => 0.0,
58
-    'max_capacity' => 200,
59
-    'members_count' => 10,
60
-    'available_time_windows' => [[45200, 95000]],
61
-    'tags' => ['TAG003']
57
+	'max_cargo_volume' => 0.0,
58
+	'max_capacity' => 200,
59
+	'members_count' => 10,
60
+	'available_time_windows' => [[45200, 95000]],
61
+	'tags' => ['TAG003']
62 62
 ]);
63 63
 
64 64
 //**********************************************************************
@@ -67,24 +67,24 @@  discard block
 block discarded – undo
67 67
 
68 68
 // Depot
69 69
 $addresses[] = Address::fromArray([
70
-    'address' => '1604 PARKRIDGE PKWY, Louisville, KY, 40214',
71
-    'is_depot' => true,
72
-    'lat' => 38.141598,
73
-    'lng' => -85.793846,
74
-    'time' => 300
70
+	'address' => '1604 PARKRIDGE PKWY, Louisville, KY, 40214',
71
+	'is_depot' => true,
72
+	'lat' => 38.141598,
73
+	'lng' => -85.793846,
74
+	'time' => 300
75 75
 ]);
76 76
 
77 77
 // Stops
78 78
 $n = 0;
79 79
 foreach ($json as $address) {
80
-    $addresses[] = Address::fromArray([
81
-        'address' => $address['address'],
82
-        'lat' => $address['lat'],
83
-        'lng' => $address['lng'],
84
-        'time' => $address['time'],
85
-        'tags' => ($n % 2 ? ['TAG001', 'TAG002'] : ['TAG003']) 
86
-    ]);
87
-    ++$n;
80
+	$addresses[] = Address::fromArray([
81
+		'address' => $address['address'],
82
+		'lat' => $address['lat'],
83
+		'lng' => $address['lng'],
84
+		'time' => $address['time'],
85
+		'tags' => ($n % 2 ? ['TAG001', 'TAG002'] : ['TAG003']) 
86
+	]);
87
+	++$n;
88 88
 }
89 89
 
90 90
 $optimizationParams = new OptimizationProblemParams();
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
 echo "Routes:" . PHP_EOL;
100 100
 foreach($problem->routes as $route)
101 101
 {
102
-    echo "\tID: " . $route->route_id . PHP_EOL;
103
-    echo "\tDistance: " . $route->trip_distance . PHP_EOL;
104
-    echo "\tAddresses:" . PHP_EOL;
102
+	echo "\tID: " . $route->route_id . PHP_EOL;
103
+	echo "\tDistance: " . $route->trip_distance . PHP_EOL;
104
+	echo "\tAddresses:" . PHP_EOL;
105 105
 
106
-    foreach($route->addresses as $address) echo "\t\t" . $address->address . PHP_EOL;
106
+	foreach($route->addresses as $address) echo "\t\t" . $address->address . PHP_EOL;
107 107
 }
Please login to merge, or discard this patch.
AdvancedConstraints/DriversSchedulesWithTerritoriesAndRetailLocation.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -28,15 +28,15 @@  discard block
 block discarded – undo
28 28
 //**********************************************************************
29 29
 // General Route Parameters
30 30
 $parameters = RouteParameters::fromArray([
31
-    'rt' => true,
32
-    'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
33
-    'route_name' => 'Drivers Schedules - 3 Territories '.date('Y-m-d H:i:s', time()),
34
-    'distance_unit' => DistanceUnit::MILES,
35
-    'device_type' => DeviceType::WEB,
36
-    'optimize' => OptimizationType::DISTANCE,
37
-    'travel_mode' => TravelMode::DRIVING,
38
-    'parts' => 2,
39
-    'advanced_constraints' => []
31
+	'rt' => true,
32
+	'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
33
+	'route_name' => 'Drivers Schedules - 3 Territories '.date('Y-m-d H:i:s', time()),
34
+	'distance_unit' => DistanceUnit::MILES,
35
+	'device_type' => DeviceType::WEB,
36
+	'optimize' => OptimizationType::DISTANCE,
37
+	'travel_mode' => TravelMode::DRIVING,
38
+	'parts' => 2,
39
+	'advanced_constraints' => []
40 40
 ]);
41 41
 
42 42
 //**********************************************************************
@@ -49,22 +49,22 @@  discard block
 block discarded – undo
49 49
 // Time Window End:   11:00 am EST
50 50
 for($i = 0; $i < 6; ++$i)
51 51
 {
52
-    $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
53
-        'max_cargo_volume' => 0.0,
54
-        'members_count' => 1,
55
-        'available_time_windows' => [[(8 + 5) * 3600 , (11 + 5) * 3600]],
56
-        'tags' => $zones[$i % 3],
57
-        'location_sequence_pattern' => [
58
-            '',
59
-            Address::fromArray([
60
-                'alias' => 'RETAIL LOCATION',
61
-                'address' => 'RETAIL LOCATION',
62
-                'lat' => 25.8741751,
63
-                'lng' => -80.1288583,
64
-                'time' => 300
65
-            ])
66
-        ]
67
-    ]);
52
+	$parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
53
+		'max_cargo_volume' => 0.0,
54
+		'members_count' => 1,
55
+		'available_time_windows' => [[(8 + 5) * 3600 , (11 + 5) * 3600]],
56
+		'tags' => $zones[$i % 3],
57
+		'location_sequence_pattern' => [
58
+			'',
59
+			Address::fromArray([
60
+				'alias' => 'RETAIL LOCATION',
61
+				'address' => 'RETAIL LOCATION',
62
+				'lat' => 25.8741751,
63
+				'lng' => -80.1288583,
64
+				'time' => 300
65
+			])
66
+		]
67
+	]);
68 68
 }
69 69
 
70 70
 //**********************************************************************
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 $addresses = [];
74 74
 
75 75
 foreach ($json as $address) {
76
-    $addresses[] = Address::fromArray($address);
76
+	$addresses[] = Address::fromArray($address);
77 77
 }
78 78
 
79 79
 $optimizationParams = new OptimizationProblemParams();
@@ -88,6 +88,6 @@  discard block
 block discarded – undo
88 88
 echo "Routes:" . PHP_EOL;
89 89
 foreach($problem->routes as $route)
90 90
 {
91
-    echo "\tID: " . $route->route_id . PHP_EOL;
92
-    echo "\tDistance: " . $route->trip_distance . PHP_EOL;
91
+	echo "\tID: " . $route->route_id . PHP_EOL;
92
+	echo "\tDistance: " . $route->trip_distance . PHP_EOL;
93 93
 }
Please login to merge, or discard this patch.
examples/AdvancedConstraints/DriversSkills.php 1 patch
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -27,32 +27,32 @@  discard block
 block discarded – undo
27 27
 $response = $member->getUsers();
28 28
 
29 29
 if ($response==NULL || !isset($response['results']) || sizeof($response['results'])<3) {
30
-    echo "Cannot retrieve 3 members" . PHP_EOL;
31
-    return;
30
+	echo "Cannot retrieve 3 members" . PHP_EOL;
31
+	return;
32 32
 }
33 33
 
34 34
 $members = [
35
-    $response['results'][0]['member_id'],
36
-    $response['results'][1]['member_id'],
37
-    $response['results'][2]['member_id']
35
+	$response['results'][0]['member_id'],
36
+	$response['results'][1]['member_id'],
37
+	$response['results'][2]['member_id']
38 38
 ];
39 39
 
40 40
 //**********************************************************************
41 41
 // General Route Parameters
42 42
 $parameters = RouteParameters::fromArray([
43
-    'rt' => true,
44
-    'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
45
-    'route_name' => 'Automatic Driver Skills Example - Single Depot, Multiple Driver '.date('Y-m-d H:i:s', time()),
46
-    'route_time' => 0,
47
-    'distance_unit' => DistanceUnit::MILES,
48
-    'device_type' => DeviceType::WEB,
49
-    'optimize' => OptimizationType::DISTANCE,
50
-    'travel_mode' => TravelMode::DRIVING,
51
-    'vehicle_capacity' => 100,
52
-    'vehicle_max_distance_mi' => 10000,
53
-    'route_max_duration' => 86400,
54
-    'parts' => 20,
55
-    'advanced_constraints'=> []
43
+	'rt' => true,
44
+	'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
45
+	'route_name' => 'Automatic Driver Skills Example - Single Depot, Multiple Driver '.date('Y-m-d H:i:s', time()),
46
+	'route_time' => 0,
47
+	'distance_unit' => DistanceUnit::MILES,
48
+	'device_type' => DeviceType::WEB,
49
+	'optimize' => OptimizationType::DISTANCE,
50
+	'travel_mode' => TravelMode::DRIVING,
51
+	'vehicle_capacity' => 100,
52
+	'vehicle_max_distance_mi' => 10000,
53
+	'route_max_duration' => 86400,
54
+	'parts' => 20,
55
+	'advanced_constraints'=> []
56 56
 ]);
57 57
 
58 58
 //**********************************************************************
@@ -61,20 +61,20 @@  discard block
 block discarded – undo
61 61
 // Time Window Start:  2:00 am EST
62 62
 // Time Window End:   16:00 am EST
63 63
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
64
-    'max_cargo_volume' => 0.0,
65
-    'max_capacity' => 200,
66
-    'available_time_windows' => [[(2 + 5) * 3600 , (16 + 5) * 3600]],
67
-    'route4me_members_id' => $members
64
+	'max_cargo_volume' => 0.0,
65
+	'max_capacity' => 200,
66
+	'available_time_windows' => [[(2 + 5) * 3600 , (16 + 5) * 3600]],
67
+	'route4me_members_id' => $members
68 68
 ]);
69 69
 
70 70
 // Schedule 2
71 71
 // Time Window Start:  8:00 am EST
72 72
 // Time Window End:   19:00 am EST
73 73
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
74
-    'max_cargo_volume' => 0.0,
75
-    'max_capacity' => 500,
76
-    'available_time_windows' => [[(8 + 5) * 3600 , (19 + 5) * 3600]],
77
-    'route4me_members_id' => $members
74
+	'max_cargo_volume' => 0.0,
75
+	'max_capacity' => 500,
76
+	'available_time_windows' => [[(8 + 5) * 3600 , (19 + 5) * 3600]],
77
+	'route4me_members_id' => $members
78 78
 ]);
79 79
 
80 80
 //**********************************************************************
@@ -83,31 +83,31 @@  discard block
 block discarded – undo
83 83
 
84 84
 // Depot
85 85
 $addresses[] = Address::fromArray([
86
-    'address' => '1604 PARKRIDGE PKWY, Louisville, KY, 40214',
87
-    'is_depot' => TRUE,
88
-    'lat' => 38.141598,
89
-    'lng' => -85.793846,
90
-    'time' => 300
86
+	'address' => '1604 PARKRIDGE PKWY, Louisville, KY, 40214',
87
+	'is_depot' => TRUE,
88
+	'lat' => 38.141598,
89
+	'lng' => -85.793846,
90
+	'time' => 300
91 91
 ]);
92 92
 
93 93
 // Stops
94 94
 $n = 0;
95 95
 foreach ($json as $address) {
96
-    $addr_obj = Address::fromArray([
97
-        'address' => $address['address'],
98
-        'lat' => $address['lat'],
99
-        'lng' => $address['lng'],
100
-        'time' => $address['time'],
101
-        'tags' => [($n < 4 ? 'Class A CDL' : 'Class B CDL')]
102
-    ]);
103
-
104
-    if($n >= 4)
105
-    {
106
-        $addr_obj->time_window_start = $address['time_window_start'];
107
-        $addr_obj->time_window_end = $address['time_window_end'];
108
-    }
109
-    $addresses[] = $addr_obj;
110
-    ++$n;
96
+	$addr_obj = Address::fromArray([
97
+		'address' => $address['address'],
98
+		'lat' => $address['lat'],
99
+		'lng' => $address['lng'],
100
+		'time' => $address['time'],
101
+		'tags' => [($n < 4 ? 'Class A CDL' : 'Class B CDL')]
102
+	]);
103
+
104
+	if($n >= 4)
105
+	{
106
+		$addr_obj->time_window_start = $address['time_window_start'];
107
+		$addr_obj->time_window_end = $address['time_window_end'];
108
+	}
109
+	$addresses[] = $addr_obj;
110
+	++$n;
111 111
 }
112 112
 
113 113
 $optimizationParams = new OptimizationProblemParams();
@@ -122,9 +122,9 @@  discard block
 block discarded – undo
122 122
 echo "Routes:" . PHP_EOL;
123 123
 foreach($problem->routes as $route)
124 124
 {
125
-    echo "\tID: " . $route->route_id . PHP_EOL;
126
-    echo "\tDistance: " . $route->trip_distance . PHP_EOL;
127
-    echo "\tAddresses:" . PHP_EOL;
125
+	echo "\tID: " . $route->route_id . PHP_EOL;
126
+	echo "\tDistance: " . $route->trip_distance . PHP_EOL;
127
+	echo "\tAddresses:" . PHP_EOL;
128 128
 
129
-    foreach($route->addresses as $address) echo "\t\t" . $address->address . PHP_EOL;
129
+	foreach($route->addresses as $address) echo "\t\t" . $address->address . PHP_EOL;
130 130
 }
Please login to merge, or discard this patch.
examples/AdvancedConstraints/SomeAddressesWithoutTags.php 1 patch
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -23,18 +23,18 @@  discard block
 block discarded – undo
23 23
 //**********************************************************************
24 24
 // General Route Parameters
25 25
 $parameters = RouteParameters::fromArray([
26
-    'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
27
-    'route_name' => 'Fleet Example 2 - Single Depot, Multiple Driver '.date('Y-m-d H:i:s', time()),
28
-    'route_time' => 0,
29
-    'vehicle_capacity' => 100,
30
-    'vehicle_max_distance_mi' => 10000,
31
-    'route_max_duration' => 86400,
32
-    'parts' => 20,
33
-    'distance_unit' => DistanceUnit::MILES,
34
-    'device_type' => DeviceType::WEB,
35
-    'optimize' => OptimizationType::DISTANCE,
36
-    'travel_mode' => TravelMode::DRIVING,
37
-    'advanced_constraints' => [] 
26
+	'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
27
+	'route_name' => 'Fleet Example 2 - Single Depot, Multiple Driver '.date('Y-m-d H:i:s', time()),
28
+	'route_time' => 0,
29
+	'vehicle_capacity' => 100,
30
+	'vehicle_max_distance_mi' => 10000,
31
+	'route_max_duration' => 86400,
32
+	'parts' => 20,
33
+	'distance_unit' => DistanceUnit::MILES,
34
+	'device_type' => DeviceType::WEB,
35
+	'optimize' => OptimizationType::DISTANCE,
36
+	'travel_mode' => TravelMode::DRIVING,
37
+	'advanced_constraints' => [] 
38 38
 ]);
39 39
 
40 40
 //**********************************************************************
@@ -43,22 +43,22 @@  discard block
 block discarded – undo
43 43
 // Time Window Start:  2:00 am EST
44 44
 // Time Window End:   15:50 am EST
45 45
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
46
-    'max_cargo_volume' => 0.0,
47
-    'max_capacity' => 200,
48
-    'members_count' => 10,
49
-    'available_time_windows' => [[25200, 75000]],
50
-    'tags' => ['TAG001', 'TAG002']
46
+	'max_cargo_volume' => 0.0,
47
+	'max_capacity' => 200,
48
+	'members_count' => 10,
49
+	'available_time_windows' => [[25200, 75000]],
50
+	'tags' => ['TAG001', 'TAG002']
51 51
 ]);
52 52
 
53 53
 // Schedule 2
54 54
 // Time Window Start:  7:33 am EST
55 55
 // Time Window End:   21:23 am EST
56 56
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
57
-    'max_cargo_volume' => 0.0,
58
-    'max_capacity' => 500,
59
-    'members_count' => 6,
60
-    'available_time_windows' => [[45200, 95000]],
61
-    'tags' => ['TAG003']
57
+	'max_cargo_volume' => 0.0,
58
+	'max_capacity' => 500,
59
+	'members_count' => 6,
60
+	'available_time_windows' => [[45200, 95000]],
61
+	'tags' => ['TAG003']
62 62
 ]);
63 63
 
64 64
 //**********************************************************************
@@ -67,33 +67,33 @@  discard block
 block discarded – undo
67 67
 
68 68
 // Depot
69 69
 $addresses[] = Address::fromArray([
70
-    'address' => '1604 PARKRIDGE PKWY, Louisville, KY, 40214',
71
-    'is_depot' => true,
72
-    'lat' => 38.141598,
73
-    'lng' => -85.793846,
74
-    'time' => 300
70
+	'address' => '1604 PARKRIDGE PKWY, Louisville, KY, 40214',
71
+	'is_depot' => true,
72
+	'lat' => 38.141598,
73
+	'lng' => -85.793846,
74
+	'time' => 300
75 75
 ]);
76 76
 
77 77
 // Stops
78 78
 $n = 0;
79 79
 foreach ($json as $address) {
80
-    $addr_obj = Address::fromArray([
81
-        'address' => $address['address'],
82
-        'lat' => $address['lat'],
83
-        'lng' => $address['lng'],
84
-        'time' => $address['time']
85
-    ]);
86
-
87
-    if($n == 0 || $n == 2 || $n == 4 || $n == 5)
88
-    {
89
-         $addr_obj->tags = ['TAG001', 'TAG002'];
90
-    }
91
-    else if($n == 1 || $n == 3)
92
-    {
93
-        $addr_obj->tags = ['TAG003'];
94
-    }
95
-    $addresses[] = $addr_obj;
96
-    ++$n;
80
+	$addr_obj = Address::fromArray([
81
+		'address' => $address['address'],
82
+		'lat' => $address['lat'],
83
+		'lng' => $address['lng'],
84
+		'time' => $address['time']
85
+	]);
86
+
87
+	if($n == 0 || $n == 2 || $n == 4 || $n == 5)
88
+	{
89
+		 $addr_obj->tags = ['TAG001', 'TAG002'];
90
+	}
91
+	else if($n == 1 || $n == 3)
92
+	{
93
+		$addr_obj->tags = ['TAG003'];
94
+	}
95
+	$addresses[] = $addr_obj;
96
+	++$n;
97 97
 }
98 98
 
99 99
 $optimizationParams = new OptimizationProblemParams();
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
 echo "Routes:" . PHP_EOL;
109 109
 foreach($problem->routes as $route)
110 110
 {
111
-    echo "\tID: " . $route->route_id . PHP_EOL;
112
-    echo "\tDistance: " . $route->trip_distance . PHP_EOL;
113
-    echo "\tAddresses:" . PHP_EOL;
111
+	echo "\tID: " . $route->route_id . PHP_EOL;
112
+	echo "\tDistance: " . $route->trip_distance . PHP_EOL;
113
+	echo "\tAddresses:" . PHP_EOL;
114 114
 
115
-    foreach($route->addresses as $address) echo "\t\t" . $address->address . PHP_EOL;
115
+	foreach($route->addresses as $address) echo "\t\t" . $address->address . PHP_EOL;
116 116
 }
Please login to merge, or discard this patch.
examples/AdvancedConstraints/DriversScheduleswithTerritoriesV2.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -27,15 +27,15 @@  discard block
 block discarded – undo
27 27
 //**********************************************************************
28 28
 // General Route Parameters
29 29
 $parameters = RouteParameters::fromArray([
30
-    'rt' => true,
31
-    'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
32
-    'route_name' => '5 Drivers Schedules '.date('Y-m-d H:i:s', time()),
33
-    'distance_unit' => DistanceUnit::MILES,
34
-    'device_type' => DeviceType::WEB,
35
-    'optimize' => OptimizationType::DISTANCE,
36
-    'travel_mode' => TravelMode::DRIVING,
37
-    'parts' => 5,
38
-    'advanced_constraints' => []
30
+	'rt' => true,
31
+	'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
32
+	'route_name' => '5 Drivers Schedules '.date('Y-m-d H:i:s', time()),
33
+	'distance_unit' => DistanceUnit::MILES,
34
+	'device_type' => DeviceType::WEB,
35
+	'optimize' => OptimizationType::DISTANCE,
36
+	'travel_mode' => TravelMode::DRIVING,
37
+	'parts' => 5,
38
+	'advanced_constraints' => []
39 39
 ]);
40 40
 
41 41
 //**********************************************************************
@@ -46,19 +46,19 @@  discard block
 block discarded – undo
46 46
 // Schedules
47 47
 // Time: 9:00 am EST => (9 + 5) * 3600 => 50400
48 48
 $available_time_windows = [
49
-    [50400, 64800], [54000, 75600], [57600, 72000], [57600, 75600], [54000, 68400], 
50
-    [54000, 75600], [54000, 68400], [57600, 79200], [43200, 57600], [57600, 79200],
51
-    [50400, 64800], [43200, 61200]
49
+	[50400, 64800], [54000, 75600], [57600, 72000], [57600, 75600], [54000, 68400], 
50
+	[54000, 75600], [54000, 68400], [57600, 79200], [43200, 57600], [57600, 79200],
51
+	[50400, 64800], [43200, 61200]
52 52
 ];
53 53
 
54 54
 for($i = 0; $i < 12; ++$i)
55 55
 {
56
-    $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
57
-        'max_cargo_volume' => 0.0,
58
-        'members_count' => 1,
59
-        'available_time_windows' => [$available_time_windows[$i]],
60
-        'tags' => $zones[$i % 3]
61
-    ]);
56
+	$parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
57
+		'max_cargo_volume' => 0.0,
58
+		'members_count' => 1,
59
+		'available_time_windows' => [$available_time_windows[$i]],
60
+		'tags' => $zones[$i % 3]
61
+	]);
62 62
 }
63 63
 
64 64
 //**********************************************************************
@@ -67,16 +67,16 @@  discard block
 block discarded – undo
67 67
 
68 68
 // Depot
69 69
 $addresses[] = Address::fromArray([
70
-    'address' => 'DEPOT',
71
-    'is_depot' => true,
72
-    'lat' => 25.694341,
73
-    'lng' => -80.166036,
74
-    'time' => 0
70
+	'address' => 'DEPOT',
71
+	'is_depot' => true,
72
+	'lat' => 25.694341,
73
+	'lng' => -80.166036,
74
+	'time' => 0
75 75
 ]);
76 76
 
77 77
 // Stops
78 78
 foreach ($json as $address) {
79
-    $addresses[] = Address::fromArray($address);
79
+	$addresses[] = Address::fromArray($address);
80 80
 }
81 81
 
82 82
 $optimizationParams = new OptimizationProblemParams();
@@ -91,6 +91,6 @@  discard block
 block discarded – undo
91 91
 echo "Routes:" . PHP_EOL;
92 92
 foreach($problem->routes as $route)
93 93
 {
94
-    echo "\tID: " . $route->route_id . PHP_EOL;
95
-    echo "\tDistance: " . $route->trip_distance . PHP_EOL;
94
+	echo "\tID: " . $route->route_id . PHP_EOL;
95
+	echo "\tDistance: " . $route->trip_distance . PHP_EOL;
96 96
 }
Please login to merge, or discard this patch.