Total Complexity | 7 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | class Config { |
||
31 | |||
32 | /** @var IConfig */ |
||
33 | private $config; |
||
34 | |||
35 | public function __construct(IConfig $config) { |
||
37 | } |
||
38 | |||
39 | public function getPublicDsn(): ?string { |
||
40 | $publicDsn = $this->config->getSystemValueString('sentry.public-dsn'); |
||
41 | |||
42 | if ($publicDsn === '') { |
||
43 | return null; |
||
44 | } |
||
45 | |||
46 | return $publicDsn; |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @deprecated |
||
51 | */ |
||
52 | public function getDsn(): ?string { |
||
53 | $dsn = $this->config->getSystemValue('sentry.dsn'); |
||
54 | |||
55 | if ($dsn !== '') { |
||
56 | return $dsn; |
||
57 | } |
||
58 | |||
59 | return $this->getPublicDsn(); |
||
60 | } |
||
61 | |||
62 | public function getCspReportUrl(): ?string { |
||
63 | return $this->config->getSystemValue('sentry.csp-report-url', null); |
||
64 | } |
||
65 | |||
66 | public function getServerVersion(): string { |
||
68 | } |
||
69 | |||
70 | } |
||
71 |