@@ -8,7 +8,7 @@ |
||
8 | 8 | "services" => [ |
9 | 9 | "darksky" => [ |
10 | 10 | "shared" => true, |
11 | - "callback" => function () { |
|
11 | + "callback" => function() { |
|
12 | 12 | $darksky = new \Anax\Controller\WeatherCurl(); |
13 | 13 | $cfg = $this->get("configuration"); |
14 | 14 | $config = $cfg->load("api_keys.php"); |
@@ -25,19 +25,19 @@ discard block |
||
25 | 25 | |
26 | 26 | |
27 | 27 | /** |
28 | - * @var string $db a sample member variable that gets initialised |
|
29 | - */ |
|
28 | + * @var string $db a sample member variable that gets initialised |
|
29 | + */ |
|
30 | 30 | private $db = "not active"; |
31 | 31 | |
32 | 32 | |
33 | 33 | |
34 | 34 | /** |
35 | - * The initialize method is optional and will always be called before the |
|
36 | - * target method/action. This is a convienient method where you could |
|
37 | - * setup internal properties that are commonly used by several methods. |
|
38 | - * |
|
39 | - * @return void |
|
40 | - */ |
|
35 | + * The initialize method is optional and will always be called before the |
|
36 | + * target method/action. This is a convienient method where you could |
|
37 | + * setup internal properties that are commonly used by several methods. |
|
38 | + * |
|
39 | + * @return void |
|
40 | + */ |
|
41 | 41 | public function initialize() : void |
42 | 42 | { |
43 | 43 | // Use to initialise member variables. |
@@ -48,10 +48,10 @@ discard block |
||
48 | 48 | |
49 | 49 | |
50 | 50 | /** |
51 | - * Update current selected style. |
|
52 | - * |
|
53 | - * @return object |
|
54 | - */ |
|
51 | + * Update current selected style. |
|
52 | + * |
|
53 | + * @return object |
|
54 | + */ |
|
55 | 55 | public function indexActionGet() |
56 | 56 | { |
57 | 57 | $request = $this->di->get("request"); |
@@ -15,9 +15,7 @@ |
||
15 | 15 | |
16 | 16 | |
17 | 17 | /** |
18 | - |
|
19 | 18 | * Curls the ip address to an api |
20 | - |
|
21 | 19 | */ |
22 | 20 | |
23 | 21 | public function curl($lat, $long) |
@@ -23,7 +23,7 @@ |
||
23 | 23 | public function curl($lat, $long) |
24 | 24 | { |
25 | 25 | // $access_key = "c5d9fa305d5b063807a2cd9ff701c080"; |
26 | - $url = "https://api.darksky.net/forecast"; |
|
26 | + $url = "https://api.darksky.net/forecast"; |
|
27 | 27 | $time = "12:00:00"; |
28 | 28 | $date = date("Y-m-d"); |
29 | 29 | $key = ""; |
@@ -9,9 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | |
11 | 11 | /** |
12 | - |
|
13 | 12 | * Validate the ip address |
14 | - |
|
15 | 13 | */ |
16 | 14 | |
17 | 15 | public function validateIp($ip) |
@@ -24,9 +22,7 @@ discard block |
||
24 | 22 | |
25 | 23 | |
26 | 24 | /** |
27 | - |
|
28 | 25 | * Validate domains |
29 | - |
|
30 | 26 | */ |
31 | 27 | |
32 | 28 | public function validateDomain($ip) |
@@ -25,19 +25,19 @@ discard block |
||
25 | 25 | |
26 | 26 | |
27 | 27 | /** |
28 | - * @var string $db a sample member variable that gets initialised |
|
29 | - */ |
|
28 | + * @var string $db a sample member variable that gets initialised |
|
29 | + */ |
|
30 | 30 | private $db = "not active"; |
31 | 31 | |
32 | 32 | |
33 | 33 | |
34 | 34 | /** |
35 | - * The initialize method is optional and will always be called before the |
|
36 | - * target method/action. This is a convienient method where you could |
|
37 | - * setup internal properties that are commonly used by several methods. |
|
38 | - * |
|
39 | - * @return void |
|
40 | - */ |
|
35 | + * The initialize method is optional and will always be called before the |
|
36 | + * target method/action. This is a convienient method where you could |
|
37 | + * setup internal properties that are commonly used by several methods. |
|
38 | + * |
|
39 | + * @return void |
|
40 | + */ |
|
41 | 41 | public function initialize() : void |
42 | 42 | { |
43 | 43 | // Use to initialise member variables. |
@@ -49,13 +49,13 @@ discard block |
||
49 | 49 | |
50 | 50 | |
51 | 51 | /** |
52 | - * This is the index method action, it handles: |
|
53 | - * ANY METHOD mountpoint |
|
54 | - * ANY METHOD mountpoint/ |
|
55 | - * ANY METHOD mountpoint/index |
|
56 | - * |
|
57 | - * @return string |
|
58 | - */ |
|
52 | + * This is the index method action, it handles: |
|
53 | + * ANY METHOD mountpoint |
|
54 | + * ANY METHOD mountpoint/ |
|
55 | + * ANY METHOD mountpoint/index |
|
56 | + * |
|
57 | + * @return string |
|
58 | + */ |
|
59 | 59 | public function indexAction() : object |
60 | 60 | { |
61 | 61 | $title = "Weather Check"; |
@@ -7,9 +7,7 @@ |
||
7 | 7 | { |
8 | 8 | |
9 | 9 | /** |
10 | - |
|
11 | 10 | * Curls the ip address to an api |
12 | - |
|
13 | 11 | */ |
14 | 12 | |
15 | 13 | public function curl($ip) |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | $access_key = "5f23ea8bea3969482c26bb6b2d8249bf"; |
20 | 20 | |
21 | - $url = 'http://api.ipstack.com/'.$ip.'?access_key='.$access_key.''; |
|
21 | + $url = 'http://api.ipstack.com/' . $ip . '?access_key=' . $access_key . ''; |
|
22 | 22 | |
23 | 23 | |
24 | 24 | // Initialize CURL request: |
@@ -25,19 +25,19 @@ discard block |
||
25 | 25 | |
26 | 26 | |
27 | 27 | /** |
28 | - * @var string $db a sample member variable that gets initialised |
|
29 | - */ |
|
28 | + * @var string $db a sample member variable that gets initialised |
|
29 | + */ |
|
30 | 30 | private $db = "not active"; |
31 | 31 | |
32 | 32 | |
33 | 33 | |
34 | 34 | /** |
35 | - * The initialize method is optional and will always be called before the |
|
36 | - * target method/action. This is a convienient method where you could |
|
37 | - * setup internal properties that are commonly used by several methods. |
|
38 | - * |
|
39 | - * @return void |
|
40 | - */ |
|
35 | + * The initialize method is optional and will always be called before the |
|
36 | + * target method/action. This is a convienient method where you could |
|
37 | + * setup internal properties that are commonly used by several methods. |
|
38 | + * |
|
39 | + * @return void |
|
40 | + */ |
|
41 | 41 | public function initialize() : void |
42 | 42 | { |
43 | 43 | // Use to initialise member variables. |
@@ -49,13 +49,13 @@ discard block |
||
49 | 49 | |
50 | 50 | |
51 | 51 | /** |
52 | - * This is the index method action, it handles: |
|
53 | - * ANY METHOD mountpoint |
|
54 | - * ANY METHOD mountpoint/ |
|
55 | - * ANY METHOD mountpoint/index |
|
56 | - * |
|
57 | - * @return string |
|
58 | - */ |
|
52 | + * This is the index method action, it handles: |
|
53 | + * ANY METHOD mountpoint |
|
54 | + * ANY METHOD mountpoint/ |
|
55 | + * ANY METHOD mountpoint/index |
|
56 | + * |
|
57 | + * @return string |
|
58 | + */ |
|
59 | 59 | public function indexAction() : object |
60 | 60 | { |
61 | 61 | $title = "Ip Validator"; |
@@ -85,10 +85,10 @@ discard block |
||
85 | 85 | |
86 | 86 | |
87 | 87 | /** |
88 | - * Update current selected style. |
|
89 | - * |
|
90 | - * @return object |
|
91 | - */ |
|
88 | + * Update current selected style. |
|
89 | + * |
|
90 | + * @return object |
|
91 | + */ |
|
92 | 92 | public function indexActionPost() : object |
93 | 93 | { |
94 | 94 | $type = "null"; |
@@ -71,11 +71,11 @@ |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | |
74 | - /** |
|
75 | - * Update current selected style. |
|
76 | - * |
|
77 | - * @return object |
|
78 | - */ |
|
74 | + /** |
|
75 | + * Update current selected style. |
|
76 | + * |
|
77 | + * @return object |
|
78 | + */ |
|
79 | 79 | public function indexActionPost() : object |
80 | 80 | { |
81 | 81 | $response = $this->di->get("response"); |