public function split(int $num): array
    {
        if ($num <= 0) {
            $message = sprintf('%s expects $num to be greater than zero', __METHOD__);
            throw new DomainException($message);
        }

        $amount = $this->castToInteger($this->amount / $num);
        $remainder = $this->amount % $num;
        $shares = [];

        for ($i = 0; $i < $num; $i++) {
            $shares[] = $this->withAmount($amount);
        }

        for ($i = 0; $i < $remainder; $i++) {
            $shares[$i] = $this->withAmount($shares[$i]->amount + 1);
        }

        return $shares;
    }