Conditions | 4 |
Paths | 8 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
78 | 6 | public function fake($options = null, $count = 5) |
|
79 | { |
||
80 | 6 | if (is_null($options)) { |
|
81 | 1 | $options = self::FAKE_RESOURCE_OBJECT; |
|
82 | } |
||
83 | 6 | $class = (($options & self::FAKE_RESOURCE_IDENTIFIER) == self::FAKE_RESOURCE_IDENTIFIER) ? |
|
84 | 6 | ResourceIdentifierFactory::class : ResourceObjectFactory::class; |
|
85 | |||
86 | 6 | $collection = []; |
|
87 | 6 | for ($i = 0; $i < $count; $i++) { |
|
88 | 6 | $collection[] = (new $class)->fake(); |
|
89 | } |
||
90 | |||
91 | 6 | return $this->setCollection($collection); |
|
92 | } |
||
94 |