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
Branch Editing-Fixing (c4d168)
by Igor
03:30
created
examples/Optimizations/GetOptimizations.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 Route4Me::setApiKey('11111111111111111111111111111111');
12 12
 
13 13
 $routeParameters = array(
14
-    'limit'  =>  5,
15
-    'offset' => 0
14
+	'limit'  =>  5,
15
+	'offset' => 0
16 16
 );
17 17
 
18 18
 $optimizationProblem = new OptimizationProblem();
@@ -20,5 +20,5 @@  discard block
 block discarded – undo
20 20
 $optimizations = $optimizationProblem->get($routeParameters);
21 21
 
22 22
 foreach ($optimizations as $optimization) {
23
-    echo "Optimization problem ID -> " . $optimization->optimization_problem_id . "<br>";
23
+	echo "Optimization problem ID -> " . $optimization->optimization_problem_id . "<br>";
24 24
 }
Please login to merge, or discard this patch.
examples/Optimizations/RemoveOptimization.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@
 block discarded – undo
24 24
 
25 25
 // Remove an optimization
26 26
 $params = array (
27
-    "optimization_problem_ids"  => array(
28
-        "0" => $optimizationProblemId
29
-    ),
30
-    "redirect"  => 0
27
+	"optimization_problem_ids"  => array(
28
+		"0" => $optimizationProblemId
29
+	),
30
+	"redirect"  => 0
31 31
 );
32 32
 
33 33
 $result = $optimization->removeOptimization($params);
Please login to merge, or discard this patch.
examples/Optimizations/reoptimization.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
 // Reoptimize an optimization
23 23
 $problemParams = array(
24
-    'optimization_problem_id'  =>  $optimizationProblemId
24
+	'optimization_problem_id'  =>  $optimizationProblemId
25 25
 );
26 26
 
27 27
 $problem = OptimizationProblem::reoptimize($problemParams);
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
@@ -22,11 +22,11 @@
 block discarded – undo
22 22
 
23 23
 // Get an optimization problem
24 24
 $optimizationProblemParams = array(
25
-    "optimization_problem_id"  =>  $optimizationProblemId
25
+	"optimization_problem_id"  =>  $optimizationProblemId
26 26
 );
27 27
 
28 28
 $optimizationProblem = $optimization->get($optimizationProblemParams);
29 29
 
30 30
 foreach ((array)$optimizationProblem as $probParts) {
31
-    Route4Me::simplePrint((array)$probParts);    
31
+	Route4Me::simplePrint((array)$probParts);    
32 32
 }
Please login to merge, or discard this patch.
examples/Optimizations/hybridOptimization.php 1 patch
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -45,22 +45,22 @@  discard block
 block discarded – undo
45 45
 $locationsFieldsMapping['monthly_nth_wwhat'] = 17;
46 46
 
47 47
 if (($handle = fopen("$source_file", "r")) !== FALSE) {
48
-        $oAbook = new AddressBookLocation();
48
+		$oAbook = new AddressBookLocation();
49 49
 
50
-        $results = $oAbook->addLocationsFromCsvFile($handle, $locationsFieldsMapping);
50
+		$results = $oAbook->addLocationsFromCsvFile($handle, $locationsFieldsMapping);
51 51
         
52
-        echo "Errors: <br><br>";
52
+		echo "Errors: <br><br>";
53 53
         
54
-        foreach ($results['fail'] as $evalue) {
55
-            echo $evalue."<br>";
56
-        }
54
+		foreach ($results['fail'] as $evalue) {
55
+			echo $evalue."<br>";
56
+		}
57 57
         
58
-        echo "Successes: <br><br>";
58
+		echo "Successes: <br><br>";
59 59
         
60
-        foreach ($results['success'] as $svalue) {
61
-            echo $svalue."<br>";
62
-        }
63
-    }
60
+		foreach ($results['success'] as $svalue) {
61
+			echo $svalue."<br>";
62
+		}
63
+	}
64 64
 
65 65
 /* Add orders with schedules from a CSV file  */
66 66
 
@@ -79,20 +79,20 @@  discard block
 block discarded – undo
79 79
 $ordersFieldsMapping['day_scheduled_for_YYMMDD'] = 8;
80 80
 
81 81
 if (($handle = fopen("$orders_file", "r")) !== FALSE) {
82
-    $order = new Order();
83
-    $results = $order->addOrdersFromCsvFile($handle, $ordersFieldsMapping);
82
+	$order = new Order();
83
+	$results = $order->addOrdersFromCsvFile($handle, $ordersFieldsMapping);
84 84
     
85
-    echo "Errors: <br><br>";
85
+	echo "Errors: <br><br>";
86 86
     
87
-    foreach ($results['fail'] as $evalue) {
88
-        echo $evalue."<br>";
89
-    }
87
+	foreach ($results['fail'] as $evalue) {
88
+		echo $evalue."<br>";
89
+	}
90 90
     
91
-    echo "Successes: <br><br>";
91
+	echo "Successes: <br><br>";
92 92
     
93
-    foreach ($results['success'] as $svalue) {
94
-        echo $svalue."<br>";
95
-    }
93
+	foreach ($results['success'] as $svalue) {
94
+		echo $svalue."<br>";
95
+	}
96 96
 }
97 97
 
98 98
 /* Get Hybrid Optimization */
@@ -101,65 +101,65 @@  discard block
 block discarded – undo
101 101
 $sched_date = date("Y-m-d", $ep);
102 102
 
103 103
 $hybridParams = array(
104
-    "target_date_string" => $sched_date,
105
-    "timezone_offset_minutes" => 480
104
+	"target_date_string" => $sched_date,
105
+	"timezone_offset_minutes" => 480
106 106
 );
107 107
 
108 108
 $optimization = new OptimizationProblem(); 
109 109
 $hybridOptimization = $optimization->getHybridOptimization($hybridParams);
110 110
 
111 111
 if ($hybridOptimization!=null) {
112
-    if (isset($hybridOptimization['optimization_problem_id'])) {
113
-        $optid = $hybridOptimization['optimization_problem_id'];
112
+	if (isset($hybridOptimization['optimization_problem_id'])) {
113
+		$optid = $hybridOptimization['optimization_problem_id'];
114 114
         
115
-        echo "Hibrid optimization with optimization_problem_id = $optid <br><br>";
115
+		echo "Hibrid optimization with optimization_problem_id = $optid <br><br>";
116 116
         
117
-        /* Add depots to the Hybrid Optimization */
118
-        $depotfile = "depots.csv";
117
+		/* Add depots to the Hybrid Optimization */
118
+		$depotfile = "depots.csv";
119 119
         
120
-        if (($handle = fopen("$depotfile", "r")) !== FALSE) {
121
-            $columns = fgetcsv($handle, $max_line_length, $delemietr);
120
+		if (($handle = fopen("$depotfile", "r")) !== FALSE) {
121
+			$columns = fgetcsv($handle, $max_line_length, $delemietr);
122 122
             
123
-            if (!$columns) {
124
-                $error['message'] = 'Empty';
125
-                 return ($error);
126
-            }
123
+			if (!$columns) {
124
+				$error['message'] = 'Empty';
125
+				 return ($error);
126
+			}
127 127
             
128
-            $depotsParams = array(
129
-                'optimization_problem_id' => $optid,
130
-                'delete_old_depots'       => true,
131
-            );
128
+			$depotsParams = array(
129
+				'optimization_problem_id' => $optid,
130
+				'delete_old_depots'       => true,
131
+			);
132 132
             
133
-            $iRow = 1;
134
-            $depotAddresses = array();
133
+			$iRow = 1;
134
+			$depotAddresses = array();
135 135
             
136
-            while (($rows = fgetcsv($handle, $max_line_length, $delemietr)) !== false) {
137
-                if ($rows[0] && $rows[1] && $rows[3] && array(null) !== $rows) {
138
-                    $depotAddress['lat'] = $rows[0];
139
-                    $depotAddress['lng'] = $rows[1];
140
-                    $depotAddress['address'] = $rows[3];   
141
-                    array_push($depotAddresses,$depotAddress);
142
-                }
143
-            }
136
+			while (($rows = fgetcsv($handle, $max_line_length, $delemietr)) !== false) {
137
+				if ($rows[0] && $rows[1] && $rows[3] && array(null) !== $rows) {
138
+					$depotAddress['lat'] = $rows[0];
139
+					$depotAddress['lng'] = $rows[1];
140
+					$depotAddress['address'] = $rows[3];   
141
+					array_push($depotAddresses,$depotAddress);
142
+				}
143
+			}
144 144
             
145
-            $depotsParams['new_depots'] = $depotAddresses;
145
+			$depotsParams['new_depots'] = $depotAddresses;
146 146
             
147
-            $optProblem = new OptimizationProblem();
147
+			$optProblem = new OptimizationProblem();
148 148
             
149
-            $resultDepots = $optProblem->addDepotsToHybrid($depotsParams);
149
+			$resultDepots = $optProblem->addDepotsToHybrid($depotsParams);
150 150
             
151
-            var_dump($resultDepots);
151
+			var_dump($resultDepots);
152 152
             
153
-            /* Reoptimize hybrid optimization */
153
+			/* Reoptimize hybrid optimization */
154 154
             
155
-            if ($resultDepots != null) {
156
-                $problemParams = array(
157
-                    'optimization_problem_id'  =>  $optid
158
-                );
159
-                $problem = OptimizationProblem::reoptimize($problemParams);
155
+			if ($resultDepots != null) {
156
+				$problemParams = array(
157
+					'optimization_problem_id'  =>  $optid
158
+				);
159
+				$problem = OptimizationProblem::reoptimize($problemParams);
160 160
                 
161
-                Route4Me::simplePrint($problem);
162
-            }
163
-        }
164
-    }
161
+				Route4Me::simplePrint($problem);
162
+			}
163
+		}
164
+	}
165 165
 }
Please login to merge, or discard this patch.
examples/get_route_manifest.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,12 +20,12 @@
 block discarded – undo
20 20
 
21 21
 // Get route manifest 
22 22
 $params = array(
23
-    "directions" => 1
23
+	"directions" => 1
24 24
 );
25 25
 
26 26
 $route = Route::getRoutes($route_id, $params);
27 27
 
28 28
 foreach ($route->addresses as $addr1) {
29
-    Route4Me::simplePrint((array)$addr1, true);
30
-    echo "<br>";
29
+	Route4Me::simplePrint((array)$addr1, true);
30
+	echo "<br>";
31 31
 }
Please login to merge, or discard this patch.
examples/Order/GetOrders.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@
 block discarded – undo
16 16
 $order = new Order();
17 17
 
18 18
 $orderParameters=Order::fromArray(array(
19
-    "offset" => 0,
20
-    'limit'  => 5,
19
+	"offset" => 0,
20
+	'limit'  => 5,
21 21
 ));
22 22
 
23 23
 $response = $order->getOrders($orderParameters);
24 24
 
25 25
 foreach ($response['results'] as $key => $order) {
26
-    Route4Me::simplePrint($order);
27
-    echo "<br>";
26
+	Route4Me::simplePrint($order);
27
+	echo "<br>";
28 28
 }
Please login to merge, or discard this patch.
examples/Order/GetOrder.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
 // Get an order
27 27
 $orderParameters=Order::fromArray(array(
28
-    "order_id"  => $orderID
28
+	"order_id"  => $orderID
29 29
 ));
30 30
 
31 31
 $response = $order->getOrder($orderParameters);
Please login to merge, or discard this patch.
examples/Order/OrderSearchInsertedDate.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@  discard block
 block discarded – undo
14 14
 Route4Me::setApiKey('11111111111111111111111111111111');
15 15
 
16 16
 $orderParameters=Order::fromArray(array(
17
-    "day_added_YYMMDD"  => date("Y-m-d", strtotime( '-1 days' )),
18
-    "offset"            => 0,
19
-    "limit"             => 5
17
+	"day_added_YYMMDD"  => date("Y-m-d", strtotime( '-1 days' )),
18
+	"offset"            => 0,
19
+	"limit"             => 5
20 20
 ));
21 21
 
22 22
 $order = new Order();
@@ -24,6 +24,6 @@  discard block
 block discarded – undo
24 24
 $response = $order->getOrder($orderParameters);
25 25
 
26 26
 foreach ($response['results'] as $key => $order) {
27
-    Route4Me::simplePrint($order);
28
-    echo "<br>";
27
+	Route4Me::simplePrint($order);
28
+	echo "<br>";
29 29
 }
Please login to merge, or discard this patch.