1 | <?php |
||||
2 | |||||
3 | namespace NoaaCapAlerts; |
||||
4 | |||||
5 | use NoaaCapAlerts\Model\NoaaAlertFactory; |
||||
6 | use NoaaCapAlerts\Model\Polygon\PolygonFactory; |
||||
7 | use NoaaCapAlerts\Parser\NoaaIndexParser; |
||||
8 | use NoaaCapAlerts\Parser\XmlParser; |
||||
9 | use NoaaCapAlerts\XmlProvider\XmlProviderFactory; |
||||
10 | use Pimple\Container; |
||||
11 | |||||
12 | class Dependencies extends Container |
||||
13 | { |
||||
14 | |||||
15 | public function __construct() |
||||
16 | 1 | { |
|||
17 | parent::__construct(); |
||||
18 | 1 | ||||
19 | $this['LocalFile'] = getenv("NoaaLocalFilePath"); |
||||
20 | 1 | ||||
21 | $this['NoaaAlertManager'] = function ($c) { |
||||
22 | return new NoaaAlertFactory($c['XmlProvider'], $c['IndexParser'], $c['PolygonFactory']); |
||||
23 | 1 | }; |
|||
24 | |||||
25 | $this['XmlProvider'] = function ($c) { |
||||
26 | return $c['XmlProviderFactory']->getXmlProvider(); |
||||
27 | 1 | }; |
|||
28 | |||||
29 | $this['XmlProviderFactory'] = function ($c) { |
||||
30 | return new XmlProviderFactory($c['LocalFile']); |
||||
31 | 1 | }; |
|||
32 | |||||
33 | $this['PolygonFactory'] = function ($c) { |
||||
0 ignored issues
–
show
|
|||||
34 | return new PolygonFactory(); |
||||
35 | 1 | }; |
|||
36 | |||||
37 | $this['IndexParser'] = function ($c) { |
||||
38 | return new NoaaIndexParser($c['XmlParser']); |
||||
39 | 1 | }; |
|||
40 | |||||
41 | $this['XmlParser'] = function ($c) { |
||||
0 ignored issues
–
show
The parameter
$c is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||
42 | return new XmlParser(); |
||||
43 | 1 | }; |
|||
44 | } |
||||
45 | 1 | } |
|||
46 | |||||
47 | |||||
48 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.