Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
41 | protected function valueFor(Argument $argument) |
||
42 | { |
||
43 | if (!$argument->hasType()) { |
||
44 | throw new UnresolveableArgument('Argument has no type.'); |
||
45 | } |
||
46 | |||
47 | if ($argument->supports($this->type, $this->options)) { |
||
48 | return $this->value; |
||
49 | } |
||
50 | |||
51 | throw new UnresolveableArgument('Unable to resolve.'); |
||
52 | } |
||
54 |