| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | 156 | public function get($key) |
|
| 18 | { |
||
| 19 | 156 | if (preg_match("/^(\S*)\s*as\s*(\S*)$/", $key, $matches)) { |
|
| 20 | 1 | $name = $matches[1]; |
|
| 21 | 1 | $alias = $matches[2]; |
|
| 22 | } else { |
||
| 23 | 155 | $name = $key; |
|
| 24 | 155 | $alias = $key; |
|
| 25 | } |
||
| 26 | 156 | if (!isset($this->data[$name])) return new NullValueObject($name, null); |
|
| 27 | |||
| 28 | 153 | $value = new ValueObject($name, $this->data[$name]); |
|
| 29 | 153 | $value->setAlias($alias); |
|
| 30 | 153 | return $value; |
|
| 31 | } |
||
| 34 | } |