public function order($generator)
    {
        $result = [];

        foreach (\range(1, $this->getSize()) as $number) {
            $value = ($generator ** $number) % $this->getSize();
            $result[$value] = $value;
        }

        return \count($result);
    }