@@ -122,7 +122,7 @@ |
||
| 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() |
@@ -307,7 +307,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | * |
@@ -37,7 +37,9 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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> |