Completed
Push — master ( c5af8a...224e88 )
by Vladimir
04:24
created
src/SodaDataset.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
     /**
123 123
      * Fetch a dataset based on a resource ID.
124 124
      *
125
-     * @param  string|SoqlQuery $filterOrSoqlQuery A simple filter or a SoqlQuery to filter the results
125
+     * @param  SoqlQuery $filterOrSoqlQuery A simple filter or a SoqlQuery to filter the results
126 126
      *
127 127
      * @see    SodaClient::enableAssociativeArrays()
128 128
      * @see    SodaClient::disableAssociativeArrays()
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -272,9 +272,9 @@
 block discarded – undo
272 272
      *
273 273
      * @return string The API URL
274 274
      */
275
-    private function buildApiUrl ($location, $identifier = NULL)
275
+    private function buildApiUrl ($location, $identifier = null)
276 276
     {
277
-        if ($identifier === NULL)
277
+        if ($identifier === null)
278 278
         {
279 279
             $identifier = $this->resourceId;
280 280
         }
Please login to merge, or discard this patch.
src/Utilities/UrlQuery.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
      *
308 308
      * @throws \allejo\Socrata\Exceptions\CurlException If cURL is misconfigured or encounters an error
309 309
      *
310
-     * @return mixed
310
+     * @return string
311 311
      */
312 312
     private function executeCurl ()
313 313
     {
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
      * @throws \allejo\Socrata\Exceptions\HttpException If the $body returned was not a JSON object
333 333
      * @throws \allejo\Socrata\Exceptions\SodaException The returned JSON object in the $body was a SODA API error
334 334
      *
335
-     * @return mixed An associative array of the decoded JSON response
335
+     * @return string An associative array of the decoded JSON response
336 336
      */
337 337
     private function handleResponseBody ($body, $result)
338 338
     {
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
      * Build a URL with GET parameters formatted into the URL
387 387
      *
388 388
      * @param string  $url    The base URL
389
-     * @param array   $params The GET parameters that need to be appended to the base URL
389
+     * @param string[]   $params The GET parameters that need to be appended to the base URL
390 390
      *
391 391
      * @since 0.1.0
392 392
      *
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -90,10 +90,10 @@
 block discarded – undo
90 90
 
91 91
         // Build up the headers we'll need to pass
92 92
         $this->headers = array(
93
-                             'Accept: application/json',
94
-                             'Content-type: application/json',
95
-                             'X-App-Token: ' . $this->token
96
-                         );
93
+                                'Accept: application/json',
94
+                                'Content-type: application/json',
95
+                                'X-App-Token: ' . $this->token
96
+                            );
97 97
 
98 98
         $this->configureCurl($email, $password);
99 99
     }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      *
138 138
      * @return mixed  An associative array matching the returned JSON result or an StdClass object
139 139
      */
140
-    public function sendGet ($params, $associativeArray, &$headers = NULL)
140
+    public function sendGet ($params, $associativeArray, &$headers = null)
141 141
     {
142 142
         if (is_array($params))
143 143
         {
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      *
173 173
      * @return mixed  An associative array matching the returned JSON result or an StdClass object
174 174
      */
175
-    public function sendPost ($dataAsJson, $associativeArray, &$headers = NULL)
175
+    public function sendPost ($dataAsJson, $associativeArray, &$headers = null)
176 176
     {
177 177
         $this->setPostFields($dataAsJson);
178 178
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
      *
199 199
      * @return mixed  An associative array matching the returned JSON result or an StdClass object
200 200
      */
201
-    public function sendPut ($dataAsJson, $associativeArray, &$headers = NULL)
201
+    public function sendPut ($dataAsJson, $associativeArray, &$headers = null)
202 202
     {
203 203
         $this->setPostFields($dataAsJson);
204 204
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
      *
221 221
      * @return mixed  An associative array matching the returned JSON result or an StdClass object
222 222
      */
223
-    public function sendDelete ($associativeArray, &$headers = NULL)
223
+    public function sendDelete ($associativeArray, &$headers = null)
224 224
     {
225 225
         curl_setopt($this->cURL, CURLOPT_CUSTOMREQUEST, "DELETE");
226 226
 
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 
267 267
         if ($ignoreReturn)
268 268
         {
269
-            return NULL;
269
+            return null;
270 270
         }
271 271
 
272 272
         $resultArray = $this->handleResponseBody($body, $result);
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
      */
366 366
     private function saveHeaders ($header, &$headers)
367 367
     {
368
-        if ($headers === NULL)
368
+        if ($headers === null)
369 369
         {
370 370
             return;
371 371
         }
Please login to merge, or discard this patch.
examples/911calls.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     // Build a SoqlQuery with functions
23 23
     $soql = new SoqlQuery();
24 24
     $soql->where("within_circle(incident_location, {$_POST['latitude']}, {$_POST['longitude']}, {$_POST['range']})")
25
-         ->limit(20);
25
+            ->limit(20);
26 26
 
27 27
     // Get the dataset. $results is now an associative array in the same format as the JSON object
28 28
     $results = $ds->getDataset($soql);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
                 </tr>
68 68
 
69 69
                 <?php // Loop through all of the results from the dataset ?>
70
-                <?php foreach($results as $row) { ?>
70
+                <?php foreach ($results as $row) { ?>
71 71
                     <tr>
72 72
                         <?php $timestamp = new DateTime($row["event_clearance_date"]); ?>
73 73
                         <td><?= $timestamp->format('Y-m-d h:ia') ?></td>
Please login to merge, or discard this patch.
Braces   +10 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,9 @@  discard block
 block discarded – undo
37 37
     <body>
38 38
         <h1>Seattle Police Department 911 Incident Response</h1>
39 39
 
40
-        <?php if (!$postBack) { ?>
40
+        <?php if (!$postBack)
41
+{
42
+?>
41 43
             <form method="POST">
42 44
                 <p>Query for all of the Seattle Fire 911 Calls calls within 500 meters of the Socrata offices in Seattle:</p>
43 45
                 <p>Try 47.59815, -122.334540 with a range of 500 meters</p>
@@ -56,7 +58,10 @@  discard block
 block discarded – undo
56 58
 
57 59
                 <input type="submit" value="Submit"/>
58 60
             </form>
59
-        <?php } else { ?>
61
+        <?php }
62
+else
63
+{
64
+?>
60 65
             <h2>Results</h2>
61 66
 
62 67
             <?php // Create a table for our actual data ?>
@@ -67,7 +72,9 @@  discard block
 block discarded – undo
67 72
                 </tr>
68 73
 
69 74
                 <?php // Loop through all of the results from the dataset ?>
70
-                <?php foreach($results as $row) { ?>
75
+                <?php foreach($results as $row)
76
+{
77
+?>
71 78
                     <tr>
72 79
                         <?php $timestamp = new DateTime($row["event_clearance_date"]); ?>
73 80
                         <td><?= $timestamp->format('Y-m-d h:ia') ?></td>
Please login to merge, or discard this patch.
src/SoqlOrderDirection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     /**
21 21
      * The ascending clause Socrata expects
22 22
      */
23
-    const ASC  = 'ASC';
23
+    const ASC = 'ASC';
24 24
 
25 25
     /**
26 26
      * The descending clause Socrata expects
Please login to merge, or discard this patch.