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.
Passed
Push — master ( 7f01d7...1527b5 )
by Oleg
02:36
created
src/Route4Me/Route4Me.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -207,12 +207,16 @@  discard block
 block discarded – undo
207 207
 
208 208
     /**
209 209
      * @param $object: JSON object
210
+     * @param \SimpleXMLElement $object
210 211
      */
211 212
     public static function object2array($object)
212 213
     {
213 214
         return @json_decode(@json_encode($object), 1);
214 215
     }
215 216
 
217
+    /**
218
+     * @param string $url
219
+     */
216 220
     public static function makeUrlRequst($url, $options) {
217 221
         $method = isset($options['method']) ? $options['method'] : 'GET';
218 222
         $query = isset($options['query']) ?
@@ -377,6 +381,7 @@  discard block
 block discarded – undo
377 381
      * Returns an array of the object properties
378 382
      * @param $object: An object.
379 383
      * @param $exclude: array of the object parameters to be excluded from the returned array.
384
+     * @param string[] $exclude
380 385
      */
381 386
     public static function getObjectProperties($object, $exclude)
382 387
     {
@@ -397,6 +402,7 @@  discard block
 block discarded – undo
397 402
      * Returns url path generated from the array of the fields and parameters.
398 403
      * @param $allFields; array of the paossible fields (parameter names).
399 404
      * @param $params: input parameters (array or object).
405
+     * @param string[] $allFields
400 406
      */
401 407
     public static function generateUrlPath($allFields, $params)
402 408
     {
Please login to merge, or discard this patch.
examples/AddressBook/AddressBookLocationSearch.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace Route4Me;
3 3
 
4
-$root = realpath(dirname(__FILE__) . '/../../');
5
-require $root . '/vendor/autoload.php';
4
+$root = realpath(dirname(__FILE__).'/../../');
5
+require $root.'/vendor/autoload.php';
6 6
 
7 7
 use Route4Me\Route4Me;
8 8
 
@@ -22,6 +22,6 @@  discard block
 block discarded – undo
22 22
 
23 23
 $abcResult = $ablocation->searchAddressBookLocations($params);
24 24
 
25
-$results = $ablocation->getValue($abcResult,"results");
25
+$results = $ablocation->getValue($abcResult, "results");
26 26
 
27 27
 Route4Me::simplePrint($results);
Please login to merge, or discard this patch.
examples/Order/UpdateOrder.php 1 patch
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
-$root=realpath(dirname(__FILE__).'/../../');
4
+$root = realpath(dirname(__FILE__).'/../../');
5 5
 require $root.'/vendor/autoload.php';
6 6
 
7 7
 use Route4Me\Route4Me;
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 assert(!is_null($randomOrder), "Can't retrieve a random order");
25 25
 
26 26
 // Update the order
27
-$randomOrder['address_2']="Lviv";
28
-$randomOrder['EXT_FIELD_phone']="032268593";
27
+$randomOrder['address_2'] = "Lviv";
28
+$randomOrder['EXT_FIELD_phone'] = "032268593";
29 29
 $randomOrder['EXT_FIELD_custom_data'] = array(
30 30
             0 => array(
31 31
                "customer_no" => "11"
Please login to merge, or discard this patch.
examples/Order/OrderSearchScheduledDate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 Route4Me::setApiKey('11111111111111111111111111111111');
15 15
 
16 16
 $orderParameters = Order::fromArray(array(
17
-    "scheduled_for_YYMMDD" => date("Y-m-d", strtotime( '-1 days' )),
17
+    "scheduled_for_YYMMDD" => date("Y-m-d", strtotime('-1 days')),
18 18
     "offset"               => 0,
19 19
     "limit"                => 5
20 20
 ));
Please login to merge, or discard this patch.
examples/Order/OrderSearchInsertedDate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 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' )),
17
+    "day_added_YYMMDD"  => date("Y-m-d", strtotime('-1 days')),
18 18
     "offset"            => 0,
19 19
     "limit"             => 5
20 20
 ));
Please login to merge, or discard this patch.
examples/get_route_tracking.php 1 patch
Spacing   +2 added lines, -2 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
-$root=realpath(dirname(__FILE__).'/../');
4
+$root = realpath(dirname(__FILE__).'/../');
5 5
 require $root.'/vendor/autoload.php';
6 6
 
7 7
 use Route4Me\Route4Me;
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 $route = new Route();
16 16
 
17 17
 // Get a random route ID
18
-$route_id=$route->getRandomRouteId(0, 10);
18
+$route_id = $route->getRandomRouteId(0, 10);
19 19
 assert(!is_null($route_id), "Can't retrieve a random route ID");
20 20
 
21 21
 $params = array(
Please login to merge, or discard this patch.
examples/Routes/SearchRoute.php 1 patch
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
-$root=realpath(dirname(__FILE__).'/../../');
4
+$root = realpath(dirname(__FILE__).'/../../');
5 5
 require $root.'/vendor/autoload.php';
6 6
 
7 7
 use Route4Me\Route4Me;
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 {
25 25
     $results = (array)$routeResult;
26 26
     
27
-    if (isset($results['route_id'])) echo "Route ID - > " . $results['route_id'] . "<br>";
27
+    if (isset($results['route_id'])) echo "Route ID - > ".$results['route_id']."<br>";
28 28
     
29
-    if (isset($results['parameters']->route_name)) echo "Route name - > " . $results['parameters']->route_name . "<br>";
29
+    if (isset($results['parameters']->route_name)) echo "Route name - > ".$results['parameters']->route_name."<br>";
30 30
 
31 31
     echo "<br>";
32 32
 }
Please login to merge, or discard this patch.
examples/Routes/DeleteRoutes.php 1 patch
Spacing   +2 added lines, -2 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
-$root=realpath(dirname(__FILE__).'/../../');
4
+$root = realpath(dirname(__FILE__).'/../../');
5 5
 require $root.'/vendor/autoload.php';
6 6
 
7 7
 use Route4Me\Route4Me;
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 echo "Random route ID 1 -> $randomRouteID1 <br>  Random route ID 2 -> $randomRouteID2 <br>";
26 26
 
27 27
 // Remove selected routes
28
-$route_ids = join(',',array($randomRouteID1,$randomRouteID2));
28
+$route_ids = join(',', array($randomRouteID1, $randomRouteID2));
29 29
 
30 30
 $result = $route->deleteRoutes($route_ids);
31 31
 
Please login to merge, or discard this patch.
src/Route4Me/Order.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     
216 216
     public static function searchOrder($params)
217 217
     {
218
-        $allQueryFields = array('fields', 'day_added_YYMMDD', 'scheduled_for_YYMMDD', 'query', 'offset', 'limit' );
218
+        $allQueryFields = array('fields', 'day_added_YYMMDD', 'scheduled_for_YYMMDD', 'query', 'offset', 'limit');
219 219
         
220 220
         $response = Route4Me::makeRequst(array(
221 221
             'url'    => Endpoint::ORDER_V4,
@@ -269,11 +269,11 @@  discard block
 block discarded – undo
269 269
         $allOrderFields = Route4Me::getObjectProperties(new Order(), $excludeFields);
270 270
         
271 271
         if (!empty($columns)) {
272
-             array_push($results['fail'],'Empty CSV table');
272
+             array_push($results['fail'], 'Empty CSV table');
273 273
              return ($results);
274 274
         }
275 275
                  
276
-        $iRow=1;
276
+        $iRow = 1;
277 277
         
278 278
         while (($rows = fgetcsv($csvFileHandle, $max_line_length, $delemietr))!==false) {
279 279
             if ($rows[$ordersFieldsMapping['cached_lat']] && $rows[$ordersFieldsMapping['cached_lng']] && $rows[$ordersFieldsMapping['address_1']] && array(null)!==$rows) {
Please login to merge, or discard this patch.