| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | 1 | public function create($data = null) |
|
| 35 | { |
||
| 36 | 1 | $fqcn = $this->fqcn; |
|
| 37 | |||
| 38 | // we call the private/protected constructor with the scope of the class that is defining it |
||
| 39 | 1 | $closure = \Closure::bind( |
|
| 40 | 1 | function () use ($fqcn) { |
|
| 41 | 1 | return new $fqcn(); |
|
| 42 | 1 | }, |
|
| 43 | 1 | null, |
|
| 44 | 1 | $this->ctorScopeFqcn |
|
| 45 | ); |
||
| 46 | |||
| 47 | 1 | return $closure(); |
|
| 48 | } |
||
| 50 |