There's no need for the condition:

```
do {
    $number = $this->generateSegment(3) . '-' . $this->generateSegment(7) . '-' . $this->generateSegment(7));
} while (!$this->numberRepository->isUnused($number));
```
I would also delegate the format of the number generation to a separate method generateNumber() which can be overridden if somebody doesn't like the 3 segment approach.

Maybe we could also call the method `numberExists()` to be less double-thinky.