Lines 0.00% 0 / 17
Methods 0.00% 0 / 6
Classes 0.00% 0 / 1
Name Lines Methods CRAP
 [BO\Zmsdldb\Importer\MySQL\Entity\Collection] offsetExists 0.00% 0 / 1 0.00% 0 / 1 2
 [BO\Zmsdldb\Importer\MySQL\Entity\Collection] offsetGet 0.00% 0 / 3 0.00% 0 / 1 6
 [BO\Zmsdldb\Importer\MySQL\Entity\Collection] offsetSet 0.00% 0 / 7 0.00% 0 / 1 12
 [BO\Zmsdldb\Importer\MySQL\Entity\Collection] offsetUnset 0.00% 0 / 1 0.00% 0 / 1 2
 [BO\Zmsdldb\Importer\MySQL\Entity\Collection] count 0.00% 0 / 1 0.00% 0 / 1 2
 [BO\Zmsdldb\Importer\MySQL\Entity\Collection] saveEntities 0.00% 0 / 4 0.00% 0 / 1 12
5class Collection extends \BO\Zmsdldb\Importer\MySQL\Entity\Collection
6{
7}

Inherited from BO\Zmsdldb\Importer\MySQL\Entity\Collection

14    final public function offsetExists($offset): bool
15    {
16        return array_key_exists($offset, $this->entities);
17    }
20    final public function offsetGet($offset): Base
21    {
22        if ($this->offsetExists($offset)) {
23            return $this->entities[$offset];
24        }
25        throw new \InvalidArgumentException(__METHOD__ . " offset({$offset}) has not been set!");
26    }
29    final public function offsetSet($offset, $value): void
30    {
31        if (!$value instanceof Base) {
32            throw new \InvalidArgumentException(
33                __METHOD__ . ' $value must be an instance of \\BO\\Zmsdldb\\Importer\\MySQL\\Entity\\Base'
34            );
35        }
36        if (null === $offset) {
37            $this->entities[] = $value;
38        } else {
39            $this->entities[$offset] = $value;
40        }
41    }
44    final public function offsetUnset($offset): void
45    {
46        unset($this->entities[$offset]);
47    }
50    final public function count(): int
51    {
52        return count($this->entities);
53    }
56    public function saveEntities(): void
57    {
58        try {
59            foreach ($this->entities as $entity) {
60                $entity->save();
61            }
62        } catch (\Exception $e) {
63            throw $e;
64        }
65    }