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 ( 47d764...311795 )
by Igor
02:54 queued 01:29
created
examples/Tracking/SetGPSPosition.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -27,16 +27,16 @@
 block discarded – undo
27 27
 // Set GPS postion to the selected route
28 28
 // Set right member_id corresponding to the API key
29 29
 $params = TrackSetParams::fromArray([
30
-    'format'            => Format::CSV,
31
-    'route_id'          => $routeId,
32
-    'member_id'         => 1,
33
-    'course'            => 1,
34
-    'speed'             => 120,
35
-    'lat'               => 41.8927521,
36
-    'lng'               => -109.0803888,
37
-    'device_type'       => 'android_phone',
38
-    'device_guid'       => 'qweqweqwe',
39
-    'device_timestamp'  => date('Y-m-d H:i:s', strtotime('-1 day')),
30
+	'format'            => Format::CSV,
31
+	'route_id'          => $routeId,
32
+	'member_id'         => 1,
33
+	'course'            => 1,
34
+	'speed'             => 120,
35
+	'lat'               => 41.8927521,
36
+	'lng'               => -109.0803888,
37
+	'device_type'       => 'android_phone',
38
+	'device_guid'       => 'qweqweqwe',
39
+	'device_timestamp'  => date('Y-m-d H:i:s', strtotime('-1 day')),
40 40
 ]);
41 41
 
42 42
 $status = Track::set($params);
Please login to merge, or discard this patch.
examples/Tracking/GetDeviceTrackingHistoryFromTimeRange.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -27,16 +27,16 @@  discard block
 block discarded – undo
27 27
 // Set GPS postion to the selected route
28 28
 // Set right member_id corresponding to the API key
29 29
 $params = TrackSetParams::fromArray([
30
-    'format'            => Format::SERIALIZED,
31
-    'route_id'          => $routeId,
32
-    'member_id'         => 1,
33
-    'course'            => 1,
34
-    'speed'             => 120,
35
-    'lat'               => 41.8927521,
36
-    'lng'               => -109.0803888,
37
-    'device_type'       => 'android_phone',
38
-    'device_guid'       => 'qweqweqwe',
39
-    'device_timestamp'  => date('Y-m-d H:i:s', strtotime('-2 day')),
30
+	'format'            => Format::SERIALIZED,
31
+	'route_id'          => $routeId,
32
+	'member_id'         => 1,
33
+	'course'            => 1,
34
+	'speed'             => 120,
35
+	'lat'               => 41.8927521,
36
+	'lng'               => -109.0803888,
37
+	'device_type'       => 'android_phone',
38
+	'device_guid'       => 'qweqweqwe',
39
+	'device_timestamp'  => date('Y-m-d H:i:s', strtotime('-2 day')),
40 40
 ]);
41 41
 
42 42
 $status = Track::set($params);
@@ -50,19 +50,19 @@  discard block
 block discarded – undo
50 50
 $endDate = time() + 1 * 24 * 3600;
51 51
 
52 52
 $params = [
53
-    'route_id'      => $routeId,
54
-    'format'        => Format::JSON,
55
-    'time_period'   => 'custom',
56
-    'start_date'    => $startDate,
57
-    'end_date'      => $endDate,
53
+	'route_id'      => $routeId,
54
+	'format'        => Format::JSON,
55
+	'time_period'   => 'custom',
56
+	'start_date'    => $startDate,
57
+	'end_date'      => $endDate,
58 58
 ];
59 59
 
60 60
 $result = $route->GetTrackingHistoryFromTimeRange($params);
61 61
 
62 62
 foreach ($result as $key => $value) {
63
-    if (is_array($value)) {
64
-        Route4Me::simplePrint($value);
65
-    } else {
66
-        echo "$key => $value <br>";
67
-    }
63
+	if (is_array($value)) {
64
+		Route4Me::simplePrint($value);
65
+	} else {
66
+		echo "$key => $value <br>";
67
+	}
68 68
 }
Please login to merge, or discard this patch.
examples/Tracking/TrackDeviceLastLocationHistory.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -27,16 +27,16 @@  discard block
 block discarded – undo
27 27
 // Set GPS postion to the selected route
28 28
 // Set right member_id corresponding to the API key
29 29
 $params = TrackSetParams::fromArray([
30
-    'format'            => Format::SERIALIZED,
31
-    'route_id'          => $routeId,
32
-    'member_id'         => 105323,
33
-    'course'            => 3,
34
-    'speed'             => 100,
35
-    'lat'               => 41.8927521,
36
-    'lng'               => -109.0803888,
37
-    'device_type'       => DeviceType::IPHONE,
38
-    'device_guid'       => 'qweqweqwe',
39
-    'device_timestamp'  => date('Y-m-d H:i:s'),
30
+	'format'            => Format::SERIALIZED,
31
+	'route_id'          => $routeId,
32
+	'member_id'         => 105323,
33
+	'course'            => 3,
34
+	'speed'             => 100,
35
+	'lat'               => 41.8927521,
36
+	'lng'               => -109.0803888,
37
+	'device_type'       => DeviceType::IPHONE,
38
+	'device_guid'       => 'qweqweqwe',
39
+	'device_timestamp'  => date('Y-m-d H:i:s'),
40 40
 ]);
41 41
 
42 42
 $status = Track::set($params);
@@ -46,25 +46,25 @@  discard block
 block discarded – undo
46 46
 assert($status['status'], "Cannot send GPS position to the selected route");
47 47
 
48 48
 if (!$status) {
49
-    echo 'Setting of GPS position failed';
49
+	echo 'Setting of GPS position failed';
50 50
 
51
-    return;
51
+	return;
52 52
 }
53 53
 
54 54
 $params = [
55
-    'route_id'                => $routeId,
56
-    'device_tracking_history' => '1',
55
+	'route_id'                => $routeId,
56
+	'device_tracking_history' => '1',
57 57
 ];
58 58
 
59 59
 $result = $route->GetLastLocation($params);
60 60
 
61 61
 if (isset($result->tracking_history)) {
62
-    foreach ($result->tracking_history as $history) {
63
-        echo 'Speed         --> '.$history['s'].'<br>';
64
-        echo 'course        --> '.$history['d'].'<br>';
65
-        echo 'Timestamp     --> '.$history['ts_friendly'].'<br>';
66
-        echo 'Latitude      --> '.$history['lt'].'<br>';
67
-        echo 'Longitude     --> '.$history['lg'].'<br>';
68
-        echo '========================================<br><br>';
69
-    }
62
+	foreach ($result->tracking_history as $history) {
63
+		echo 'Speed         --> '.$history['s'].'<br>';
64
+		echo 'course        --> '.$history['d'].'<br>';
65
+		echo 'Timestamp     --> '.$history['ts_friendly'].'<br>';
66
+		echo 'Latitude      --> '.$history['lt'].'<br>';
67
+		echo 'Longitude     --> '.$history['lg'].'<br>';
68
+		echo '========================================<br><br>';
69
+	}
70 70
 }
Please login to merge, or discard this patch.
examples/Tracking/QueryUserLocations.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@
 block discarded – undo
22 22
 $queriedUserLocations = $track->getUserLocations($email);
23 23
 
24 24
 foreach ($queriedUserLocations As $memberId => $userLocation) {
25
-    echo $userLocation['member_data']['member_first_name'].' '.$userLocation['member_data']['member_last_name']." --> ";
26
-    if (isset($userLocation['tracking']['position_lng'])) {
27
-        echo "Longitude: ".$userLocation['tracking']['position_lng'].", Latitude: ".$userLocation['tracking']['position_lat'];
28
-    }
29
-    echo "<br>";
25
+	echo $userLocation['member_data']['member_first_name'].' '.$userLocation['member_data']['member_last_name']." --> ";
26
+	if (isset($userLocation['tracking']['position_lng'])) {
27
+		echo "Longitude: ".$userLocation['tracking']['position_lng'].", Latitude: ".$userLocation['tracking']['position_lat'];
28
+	}
29
+	echo "<br>";
30 30
 }
Please login to merge, or discard this patch.
examples/optimizationWithFineTuning.php 1 patch
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -25,25 +25,25 @@  discard block
 block discarded – undo
25 25
 $addresses = [];
26 26
 
27 27
 foreach ($json as $address) {
28
-    $addresses[] = Address::fromArray($address);
28
+	$addresses[] = Address::fromArray($address);
29 29
 }
30 30
 
31 31
 //region Optimization With Duration Priority FineTuning
32 32
 $parameters = RouteParameters::fromArray([
33
-    'route_name'                => 'Optimization With Duration Priority FineTuning. '.date('Y-m-d H:i'),
34
-    'algorithm_type'            => AlgorithmType::CVRP_TW_SD,
35
-    'route_time'                => 23200,
36
-    'optimize'                  => OptimizationType::TIME,
37
-    'device_type'               => DeviceType::WEB,
38
-    'udu_distance_unit'         => 'km',
39
-    'route_max_duration'        => 86400,
40
-    'travel_mode'               => TravelMode::DRIVING,
41
-    'vehicle_capacity'          => 30,
42
-    'vehicle_max_distance_mi'   => 10000,
43
-    'rt'                        => true,
44
-    'target_duration'           => 100,
45
-    'target_distance'           => 0,
46
-    'target_wait_by_tail_size'  => 0
33
+	'route_name'                => 'Optimization With Duration Priority FineTuning. '.date('Y-m-d H:i'),
34
+	'algorithm_type'            => AlgorithmType::CVRP_TW_SD,
35
+	'route_time'                => 23200,
36
+	'optimize'                  => OptimizationType::TIME,
37
+	'device_type'               => DeviceType::WEB,
38
+	'udu_distance_unit'         => 'km',
39
+	'route_max_duration'        => 86400,
40
+	'travel_mode'               => TravelMode::DRIVING,
41
+	'vehicle_capacity'          => 30,
42
+	'vehicle_max_distance_mi'   => 10000,
43
+	'rt'                        => true,
44
+	'target_duration'           => 100,
45
+	'target_distance'           => 0,
46
+	'target_wait_by_tail_size'  => 0
47 47
 
48 48
 ]);
49 49
 
@@ -71,20 +71,20 @@  discard block
 block discarded – undo
71 71
 
72 72
 //region Optimization With Distance Priority FineTuning
73 73
 $parameters = RouteParameters::fromArray([
74
-    'route_name'                => 'Optimization With Distance Priority FineTuning. '.date('Y-m-d H:i'),
75
-    'algorithm_type'            => AlgorithmType::CVRP_TW_SD,
76
-    'route_time'                => 23200,
77
-    'optimize'                  => OptimizationType::TIME,
78
-    'device_type'               => DeviceType::WEB,
79
-    'udu_distance_unit'         => 'km',
80
-    'route_max_duration'        => 86400,
81
-    'travel_mode'               => TravelMode::DRIVING,
82
-    'vehicle_capacity'          => 30,
83
-    'vehicle_max_distance_mi'   => 10000,
84
-    'rt'                        => true,
85
-    'target_duration'           => 0,
86
-    'target_distance'           => 100,
87
-    'target_wait_by_tail_size'  => 0
74
+	'route_name'                => 'Optimization With Distance Priority FineTuning. '.date('Y-m-d H:i'),
75
+	'algorithm_type'            => AlgorithmType::CVRP_TW_SD,
76
+	'route_time'                => 23200,
77
+	'optimize'                  => OptimizationType::TIME,
78
+	'device_type'               => DeviceType::WEB,
79
+	'udu_distance_unit'         => 'km',
80
+	'route_max_duration'        => 86400,
81
+	'travel_mode'               => TravelMode::DRIVING,
82
+	'vehicle_capacity'          => 30,
83
+	'vehicle_max_distance_mi'   => 10000,
84
+	'rt'                        => true,
85
+	'target_duration'           => 0,
86
+	'target_distance'           => 100,
87
+	'target_wait_by_tail_size'  => 0
88 88
 
89 89
 ]);
90 90
 
@@ -112,20 +112,20 @@  discard block
 block discarded – undo
112 112
 
113 113
 //region Optimization With TimeWaiting Priority FineTuning
114 114
 $parameters = RouteParameters::fromArray([
115
-    'route_name'                => 'Optimization With WaitingTime Priority FineTuning. '.date('Y-m-d H:i'),
116
-    'algorithm_type'            => AlgorithmType::CVRP_TW_SD,
117
-    'route_time'                => 23200,
118
-    'optimize'                  => OptimizationType::TIME,
119
-    'device_type'               => DeviceType::WEB,
120
-    'udu_distance_unit'         => 'km',
121
-    'route_max_duration'        => 86400,
122
-    'travel_mode'               => TravelMode::DRIVING,
123
-    'vehicle_capacity'          => 30,
124
-    'vehicle_max_distance_mi'   => 10000,
125
-    'rt'                        => true,
126
-    'target_duration'           => 0,
127
-    'target_distance'           => 0,
128
-    'target_wait_by_tail_size'  => 100
115
+	'route_name'                => 'Optimization With WaitingTime Priority FineTuning. '.date('Y-m-d H:i'),
116
+	'algorithm_type'            => AlgorithmType::CVRP_TW_SD,
117
+	'route_time'                => 23200,
118
+	'optimize'                  => OptimizationType::TIME,
119
+	'device_type'               => DeviceType::WEB,
120
+	'udu_distance_unit'         => 'km',
121
+	'route_max_duration'        => 86400,
122
+	'travel_mode'               => TravelMode::DRIVING,
123
+	'vehicle_capacity'          => 30,
124
+	'vehicle_max_distance_mi'   => 10000,
125
+	'rt'                        => true,
126
+	'target_duration'           => 0,
127
+	'target_distance'           => 0,
128
+	'target_wait_by_tail_size'  => 100
129 129
 
130 130
 ]);
131 131
 
Please login to merge, or discard this patch.
examples/Optimizations/OptimizationWithCallbackUrl.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -18,27 +18,27 @@  discard block
 block discarded – undo
18 18
 
19 19
 $addresses = [];
20 20
 foreach ($json as $address) {
21
-    $addresses[] = Address::fromArray($address);
21
+	$addresses[] = Address::fromArray($address);
22 22
 }
23 23
 
24 24
 $parameters = RouteParameters::fromArray([
25
-    'algorithm_type'    => Algorithmtype::TSP,
26
-    'store_route'       => false,
27
-    'route_name'        => 'Single Driver Multiple TimeWindows 12 Stops',
28
-    'shared_publicly'   => true,
29
-    'route_date'        => time() + 24 * 60 * 60,
30
-    'route_time'        => 5 * 3600 + 30 * 60,
31
-    'distance_unit'     => DistanceUnit::MILES,
32
-    'device_type'       => DeviceType::WEB,
33
-    'optimize'          => OptimizationType::DISTANCE,
25
+	'algorithm_type'    => Algorithmtype::TSP,
26
+	'store_route'       => false,
27
+	'route_name'        => 'Single Driver Multiple TimeWindows 12 Stops',
28
+	'shared_publicly'   => true,
29
+	'route_date'        => time() + 24 * 60 * 60,
30
+	'route_time'        => 5 * 3600 + 30 * 60,
31
+	'distance_unit'     => DistanceUnit::MILES,
32
+	'device_type'       => DeviceType::WEB,
33
+	'optimize'          => OptimizationType::DISTANCE,
34 34
 ]);
35 35
 
36 36
 $optimizationParams = OptimizationProblemParams::fromArray([
37
-    'addresses'                 => $addresses,
38
-    'parameters'                => $parameters,
39
-    'optimized_callback_url'    => @'https://requestb.in/1o6cgge1',
40
-    'show_directions'           => true,
41
-    'redirect'                  => false,
37
+	'addresses'                 => $addresses,
38
+	'parameters'                => $parameters,
39
+	'optimized_callback_url'    => @'https://requestb.in/1o6cgge1',
40
+	'show_directions'           => true,
41
+	'redirect'                  => false,
42 42
 ]);
43 43
 
44 44
 $optimizationParams = new OptimizationProblemParams();
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
 $problem = OptimizationProblem::optimize($optimizationParams);
49 49
 
50 50
 foreach ((array) $problem as $key => $value) {
51
-    if (is_string($value)) {
52
-        echo $key.' --> '.$value.'<br>';
53
-    } else {
54
-        echo "************ $key ************* <br>";
55
-        Route4Me::simplePrint((array) $value, true);
56
-        echo '******************************* <br>';
57
-    }
51
+	if (is_string($value)) {
52
+		echo $key.' --> '.$value.'<br>';
53
+	} else {
54
+		echo "************ $key ************* <br>";
55
+		Route4Me::simplePrint((array) $value, true);
56
+		echo '******************************* <br>';
57
+	}
58 58
 }
Please login to merge, or discard this patch.
examples/Optimizations/GetOptimizations.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@  discard block
 block discarded – undo
9 9
 Route4Me::setApiKey(Constants::API_KEY);
10 10
 
11 11
 $routeParameters = [
12
-    'limit'  => 5,
13
-    'offset' => 0,
12
+	'limit'  => 5,
13
+	'offset' => 0,
14 14
 ];
15 15
 
16 16
 $optimizationProblem = new OptimizationProblem();
@@ -18,5 +18,5 @@  discard block
 block discarded – undo
18 18
 $optimizations = $optimizationProblem->get($routeParameters);
19 19
 
20 20
 foreach ($optimizations as $optimization) {
21
-    echo 'Optimization problem ID -> '.$optimization->optimization_problem_id.'<br>';
21
+	echo 'Optimization problem ID -> '.$optimization->optimization_problem_id.'<br>';
22 22
 }
Please login to merge, or discard this patch.
examples/Optimizations/GetOptimization.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@
 block discarded – undo
20 20
 
21 21
 // Get an optimization problem
22 22
 $optimizationProblemParams = [
23
-    'optimization_problem_id' => $optimizationProblemId,
23
+	'optimization_problem_id' => $optimizationProblemId,
24 24
 ];
25 25
 
26 26
 $optimizationProblem = $optimization->get($optimizationProblemParams);
27 27
 
28 28
 foreach ((array) $optimizationProblem as $probParts) {
29
-    Route4Me::simplePrint((array) $probParts);
29
+	Route4Me::simplePrint((array) $probParts);
30 30
 }
Please login to merge, or discard this patch.
examples/Optimizations/hybridOptimization.php 1 patch
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -42,21 +42,21 @@  discard block
 block discarded – undo
42 42
 $locationsFieldsMapping['monthly_nth_what'] = 17;
43 43
 
44 44
 if (false !== ($handle = fopen("$source_file", 'r'))) {
45
-    $oaBook = new AddressBookLocation();
45
+	$oaBook = new AddressBookLocation();
46 46
 
47
-    $results = $oaBook->addLocationsFromCsvFile($handle, $locationsFieldsMapping);
47
+	$results = $oaBook->addLocationsFromCsvFile($handle, $locationsFieldsMapping);
48 48
 
49
-    echo 'Errors: <br><br>';
49
+	echo 'Errors: <br><br>';
50 50
 
51
-    foreach ($results['fail'] as $eValue) {
52
-        echo $eValue.'<br>';
53
-    }
51
+	foreach ($results['fail'] as $eValue) {
52
+		echo $eValue.'<br>';
53
+	}
54 54
 
55
-    echo 'Successes: <br><br>';
55
+	echo 'Successes: <br><br>';
56 56
 
57
-    foreach ($results['success'] as $sValue) {
58
-        echo $sValue.'<br>';
59
-    }
57
+	foreach ($results['success'] as $sValue) {
58
+		echo $sValue.'<br>';
59
+	}
60 60
 }
61 61
 
62 62
 /* Add orders with schedules from a CSV file  */
@@ -76,20 +76,20 @@  discard block
 block discarded – undo
76 76
 $ordersFieldsMapping['day_scheduled_for_YYMMDD'] = 8;
77 77
 
78 78
 if (false !== ($handle = fopen("$orders_file", 'r'))) {
79
-    $order = new Order();
80
-    $results = $order->addOrdersFromCsvFile($handle, $ordersFieldsMapping);
79
+	$order = new Order();
80
+	$results = $order->addOrdersFromCsvFile($handle, $ordersFieldsMapping);
81 81
 
82
-    echo 'Errors: <br><br>';
82
+	echo 'Errors: <br><br>';
83 83
 
84
-    foreach ($results['fail'] as $eValue) {
85
-        echo $eValue.'<br>';
86
-    }
84
+	foreach ($results['fail'] as $eValue) {
85
+		echo $eValue.'<br>';
86
+	}
87 87
 
88
-    echo 'Successes: <br><br>';
88
+	echo 'Successes: <br><br>';
89 89
 
90
-    foreach ($results['success'] as $sValue) {
91
-        echo $sValue.'<br>';
92
-    }
90
+	foreach ($results['success'] as $sValue) {
91
+		echo $sValue.'<br>';
92
+	}
93 93
 }
94 94
 
95 95
 /* Get Hybrid Optimization */
@@ -98,64 +98,64 @@  discard block
 block discarded – undo
98 98
 $scheduleDate = date('Y-m-d', $ep);
99 99
 
100 100
 $hybridParams = [
101
-    'target_date_string'      => $scheduleDate,
102
-    'timezone_offset_minutes' => 480,
101
+	'target_date_string'      => $scheduleDate,
102
+	'timezone_offset_minutes' => 480,
103 103
 ];
104 104
 
105 105
 $optimization = new OptimizationProblem();
106 106
 $hybridOptimization = $optimization->getHybridOptimization($hybridParams);
107 107
 
108 108
 if (null != $hybridOptimization) {
109
-    if (isset($hybridOptimization['optimization_problem_id'])) {
110
-        $optId = $hybridOptimization['optimization_problem_id'];
109
+	if (isset($hybridOptimization['optimization_problem_id'])) {
110
+		$optId = $hybridOptimization['optimization_problem_id'];
111 111
 
112
-        echo "Hibrid optimization with optimization_problem_id = $optId <br><br>";
112
+		echo "Hibrid optimization with optimization_problem_id = $optId <br><br>";
113 113
 
114
-        /* Add depots to the Hybrid Optimization */
115
-        $depotFile = 'depots.csv';
114
+		/* Add depots to the Hybrid Optimization */
115
+		$depotFile = 'depots.csv';
116 116
 
117
-        if (false !== ($handle = fopen("$depotFile", 'r'))) {
118
-            $columns = fgetcsv($handle, $max_line_length, $delimiter);
117
+		if (false !== ($handle = fopen("$depotFile", 'r'))) {
118
+			$columns = fgetcsv($handle, $max_line_length, $delimiter);
119 119
 
120
-            if (empty($columns)) {
121
-                $error['message'] = 'Empty';
120
+			if (empty($columns)) {
121
+				$error['message'] = 'Empty';
122 122
 
123
-                return $error;
124
-            }
123
+				return $error;
124
+			}
125 125
 
126
-            $depotsParams = [
127
-                'optimization_problem_id' => $optId,
128
-                'delete_old_depots' => true,
129
-            ];
126
+			$depotsParams = [
127
+				'optimization_problem_id' => $optId,
128
+				'delete_old_depots' => true,
129
+			];
130 130
 
131
-            $iRow = 1;
132
-            $depotAddresses = [];
131
+			$iRow = 1;
132
+			$depotAddresses = [];
133 133
 
134
-            while (false !== ($rows = fgetcsv($handle, $max_line_length, $delimiter))) {
135
-                if ($rows[0] && $rows[1] && $rows[3] && [null] !== $rows) {
136
-                    $depotAddress['lat'] = $rows[0];
137
-                    $depotAddress['lng'] = $rows[1];
138
-                    $depotAddress['address'] = $rows[3];
139
-                    array_push($depotAddresses, $depotAddress);
140
-                }
141
-            }
134
+			while (false !== ($rows = fgetcsv($handle, $max_line_length, $delimiter))) {
135
+				if ($rows[0] && $rows[1] && $rows[3] && [null] !== $rows) {
136
+					$depotAddress['lat'] = $rows[0];
137
+					$depotAddress['lng'] = $rows[1];
138
+					$depotAddress['address'] = $rows[3];
139
+					array_push($depotAddresses, $depotAddress);
140
+				}
141
+			}
142 142
 
143
-            $depotsParams['new_depots'] = $depotAddresses;
143
+			$depotsParams['new_depots'] = $depotAddresses;
144 144
 
145
-            $optProblem = new OptimizationProblem();
145
+			$optProblem = new OptimizationProblem();
146 146
 
147
-            $resultDepots = $optProblem->addDepotsToHybrid($depotsParams);
147
+			$resultDepots = $optProblem->addDepotsToHybrid($depotsParams);
148 148
 
149
-            /* Reoptimize hybrid optimization */
149
+			/* Reoptimize hybrid optimization */
150 150
 
151
-            if (null != $resultDepots) {
152
-                $problemParams = [
153
-                    'optimization_problem_id' => $optId,
154
-                ];
155
-                $problem = OptimizationProblem::reoptimize($problemParams);
151
+			if (null != $resultDepots) {
152
+				$problemParams = [
153
+					'optimization_problem_id' => $optId,
154
+				];
155
+				$problem = OptimizationProblem::reoptimize($problemParams);
156 156
 
157
-                Route4Me::simplePrint($problem);
158
-            }
159
-        }
160
-    }
157
+				Route4Me::simplePrint($problem);
158
+			}
159
+		}
160
+	}
161 161
 }
Please login to merge, or discard this patch.