| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function getParameter($paramName, $scope = null) |
||
| 32 | { |
||
| 33 | $parsed = explode('.', $paramName, 2); |
||
| 34 | if (count($parsed) === 1) { |
||
| 35 | throw new \Exception("Parameter '$paramName' is not in the good format for flexible configuration resolving"); |
||
| 36 | } |
||
| 37 | |||
| 38 | if ($this->ezConfigResolver->hasParameter($parsed[1], $parsed[0], $scope)) { |
||
| 39 | return $this->ezConfigResolver->getParameter($parsed[1], $parsed[0], $scope); |
||
| 40 | } |
||
| 41 | |||
| 42 | return $this->container->getParameter($paramName); |
||
| 43 | } |
||
| 44 | } |
||
| 45 |