Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2.0116 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | 3 | public function __call($name, $arguments) |
|
36 | { |
||
37 | 3 | $className = "\\Rundeck\\Resources\\".ucfirst($name); |
|
38 | 3 | if (class_exists($className)) { |
|
39 | 3 | array_unshift($arguments, $this->client); |
|
40 | 3 | $resource = new \ReflectionClass($className); |
|
41 | 3 | return $resource->newInstanceArgs($arguments); |
|
42 | } else { |
||
43 | throw new \Exception("This resource doesn't exist."); |
||
44 | } |
||
45 | } |
||
46 | } |
||
47 |