| Total Complexity | 5 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 8 | final class FactoryCollection |
||
| 9 | { |
||
| 10 | /** @var Factory */ |
||
| 11 | private $factory; |
||
| 12 | |||
| 13 | /** @var int */ |
||
| 14 | private $count; |
||
| 15 | |||
| 16 | public function __construct(Factory $factory, int $count) |
||
| 17 | { |
||
| 18 | if ($count < 1) { |
||
| 19 | throw new \InvalidArgumentException('Count must be greater than 0.'); |
||
| 20 | } |
||
| 21 | |||
| 22 | $this->factory = $factory; |
||
| 23 | $this->count = $count; |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param array|callable $attributes |
||
| 28 | * |
||
| 29 | * @return Proxy[]|object[] |
||
| 30 | */ |
||
| 31 | public function create($attributes = []): array |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @internal |
||
| 38 | */ |
||
| 39 | public function createForRelationship(Proxy $proxy): void |
||
| 50 |