| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 42 | 3 | public function make( $class ) { |
|
| 43 | 3 | $instance = $this->app->resolve( $class ); |
|
| 44 | |||
| 45 | 3 | if ( $instance === null ) { |
|
| 46 | 2 | if ( ! class_exists( $class ) ) { |
|
| 47 | 1 | throw new ClassNotFoundException( 'Class not found: ' . $class ); |
|
| 48 | } |
||
| 49 | |||
| 50 | 1 | $instance = new $class(); |
|
| 51 | } |
||
| 52 | |||
| 53 | 2 | return $instance; |
|
| 54 | } |
||
| 56 |