@@ -19,27 +19,27 @@ |
||
19 | 19 | |
20 | 20 | $this['LocalFile'] = getenv("NoaaLocalFilePath"); |
21 | 21 | |
22 | - $this['NoaaAlertManager'] = function ($c) { |
|
22 | + $this['NoaaAlertManager'] = function($c) { |
|
23 | 23 | return new NoaaAlertFactory($c['XmlProvider'], $c['IndexParser'], $c['PolygonFactory']); |
24 | 24 | }; |
25 | 25 | |
26 | - $this['XmlProvider'] = function ($c) { |
|
26 | + $this['XmlProvider'] = function($c) { |
|
27 | 27 | return $c['XmlProviderFactory']->getXmlProvider(); |
28 | 28 | }; |
29 | 29 | |
30 | - $this['XmlProviderFactory'] = function ($c) { |
|
30 | + $this['XmlProviderFactory'] = function($c) { |
|
31 | 31 | return new XmlProviderFactory($c['LocalFile']); |
32 | 32 | }; |
33 | 33 | |
34 | - $this['PolygonFactory'] = function ($c) { |
|
34 | + $this['PolygonFactory'] = function($c) { |
|
35 | 35 | return new PolygonFactory(); |
36 | 36 | }; |
37 | 37 | |
38 | - $this['IndexParser'] = function ($c) { |
|
38 | + $this['IndexParser'] = function($c) { |
|
39 | 39 | return new NoaaIndexParser($c['XmlParser']); |
40 | 40 | }; |
41 | 41 | |
42 | - $this['XmlParser'] = function ($c) { |
|
42 | + $this['XmlParser'] = function($c) { |
|
43 | 43 | return new XmlParser(); |
44 | 44 | }; |
45 | 45 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $hitsBefore = 0; |
41 | 41 | $hitsAfter = 0; |
42 | 42 | |
43 | - foreach($longitudeHits as $hit) { |
|
43 | + foreach ($longitudeHits as $hit) { |
|
44 | 44 | if ($hit <= $targetPoint->getLongitude()) { |
45 | 45 | $hitsBefore++; |
46 | 46 | } elseif ($hit >= $targetPoint->getLongitude()) { |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | $slope = ($point2->getLatitude() - $point1->getLatitude()) / ($point2->getLongitude() - $point1->getLongitude()); |
77 | - $b = $point1->getLatitude() - ($slope*$point1->getLongitude()); |
|
77 | + $b = $point1->getLatitude() - ($slope * $point1->getLongitude()); |
|
78 | 78 | |
79 | 79 | return ($latitude + $b) / $slope; |
80 | 80 | } |