-
Notifications
You must be signed in to change notification settings - Fork 93
/
Copy pathConfiguration.php
41 lines (33 loc) · 1022 Bytes
/
Configuration.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php declare(strict_types = 1);
namespace PHPStan\Symfony;
/**
* @phpstan-type ParametersArray array{
* containerXmlPath?: string, container_xml_path?: string,
* constantHassers?: bool, constant_hassers?: bool,
* consoleApplicationLoader?: string, console_application_loader?: string,
* }
*/
final class Configuration
{
/** @var ParametersArray */
private $parameters;
/**
* @phpstan-param ParametersArray $parameters
*/
public function __construct(array $parameters)
{
$this->parameters = $parameters;
}
public function getContainerXmlPath(): ?string
{
return $this->parameters['containerXmlPath'] ?? $this->parameters['container_xml_path'] ?? null;
}
public function hasConstantHassers(): bool
{
return $this->parameters['constantHassers'] ?? $this->parameters['constant_hassers'] ?? true;
}
public function getConsoleApplicationLoader(): ?string
{
return $this->parameters['consoleApplicationLoader'] ?? $this->parameters['console_application_loader'] ?? null;
}
}