/** * @param string[] $map * @return bool * @throws RangeException */ public function write(array $map) { if (count($map) > $this->total) { throw new RangeException(); } return $this->file->writeArray($map); }
/** * @param int[] $map * @return bool * @throws InvalidArgumentException */ public function write(array $map) { if (count($map) === 0) { throw new InvalidArgumentException(); } return $this->file->writeArray($map); }