| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | 3 | public function __construct(Environment $env, $name = null) |
|
| 43 | { |
||
| 44 | 3 | $this->env = $env; |
|
| 45 | |||
| 46 | 3 | if ($name === null) { |
|
| 47 | 2 | $components = explode('\\', get_called_class()); |
|
| 48 | 2 | $class = array_pop($components); |
|
| 49 | 2 | $name = strtolower($class); |
|
| 50 | 2 | } |
|
| 51 | |||
| 52 | 3 | parent::__construct(sprintf('%s:%s', $env, $name)); |
|
| 53 | 3 | } |
|
| 54 | } |
||
| 55 |