| Conditions | 5 |
| Paths | 3 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | function factory() |
||
| 14 | { |
||
| 15 | $factory = new ModelFactory(Factory::create()); |
||
| 16 | |||
| 17 | $arguments = func_get_args(); |
||
| 18 | |||
| 19 | if (isset($arguments[1]) && is_string($arguments[1])) { |
||
| 20 | return $factory->forClass($arguments[0], $arguments[1]) |
||
| 21 | ->times(isset($arguments[2]) ? $arguments[2] : null); |
||
| 22 | } elseif (isset($arguments[1])) { |
||
| 23 | return $factory->forClass($arguments[0])->times($arguments[1]); |
||
| 24 | } |
||
| 25 | |||
| 26 | return $factory->forClass($arguments[0]); |
||
| 27 | } |
||
| 28 | } |
||
| 29 |