@@ -8,7 +8,7 @@ |
||
| 8 | 8 | "darkSky" => [ |
| 9 | 9 | // "active" => true, |
| 10 | 10 | "shared" => false, |
| 11 | - "callback" => function () { |
|
| 11 | + "callback" => function() { |
|
| 12 | 12 | $curl = new \Oliver\Curl\Curl(); |
| 13 | 13 | $darkSky = new \Oliver\DarkSky\DarkSky($curl); |
| 14 | 14 | $darkSky->setDI($this); |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | * @var string $key The session key used to store the active style. |
| 23 | 23 | */ |
| 24 | 24 | private $cssUrl = "css"; |
| 25 | - private $cssDir = ANAX_INSTALL_PATH . "/htdocs/css"; |
|
| 25 | + private $cssDir = ANAX_INSTALL_PATH."/htdocs/css"; |
|
| 26 | 26 | private $styles = []; |
| 27 | 27 | private static $key = "AnaxStyleChooser"; |
| 28 | 28 | |
@@ -141,8 +141,8 @@ discard block |
||
| 141 | 141 | $response = $this->di->get("response"); |
| 142 | 142 | $session = $this->di->get("session"); |
| 143 | 143 | |
| 144 | - $key = $this->cssUrl . "/" . $style . ".css"; |
|
| 145 | - $keyMin = $this->cssUrl . "/" . $style . ".min.css"; |
|
| 144 | + $key = $this->cssUrl."/".$style.".css"; |
|
| 145 | + $keyMin = $this->cssUrl."/".$style.".min.css"; |
|
| 146 | 146 | |
| 147 | 147 | if ($style === "none") { |
| 148 | 148 | $session->set("flashmessage", "Unsetting the style and using the default style."); |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | $this->coordinates = $coordinates; |
| 82 | 82 | $urls = []; |
| 83 | 83 | |
| 84 | - for ($i=0; $i < $daysBack; $i++) { |
|
| 84 | + for ($i = 0; $i < $daysBack; $i++) { |
|
| 85 | 85 | $date = $this->formatDate($i); |
| 86 | 86 | $urls[] = "$this->baseUrl/$this->apiKey/{$coordinates['lat']},{$coordinates['long']},$date?units=si&lang=sv"; |
| 87 | 87 | } |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | $curlHandles = []; |
| 15 | 15 | $multiHandle = curl_multi_init(); |
| 16 | 16 | |
| 17 | - for ($i=0; $i < count($urls); $i++) { |
|
| 17 | + for ($i = 0; $i < count($urls); $i++) { |
|
| 18 | 18 | $curlHandles[$i] = curl_init($urls[$i]); |
| 19 | 19 | curl_setopt($curlHandles[$i], CURLOPT_RETURNTRANSFER, true); |
| 20 | 20 | curl_multi_add_handle($multiHandle, $curlHandles[$i]); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | } while ($running); |
| 27 | 27 | |
| 28 | 28 | $results = []; |
| 29 | - for ($i=0; $i < count($curlHandles); $i++) { |
|
| 29 | + for ($i = 0; $i < count($curlHandles); $i++) { |
|
| 30 | 30 | $results[] = (json_decode(curl_multi_getcontent($curlHandles[$i]), true)); |
| 31 | 31 | } |
| 32 | 32 | return $results; |