public function findAllLinesByMode($coverageId, $networkId)
    {
        $count = 30;
        $result = $this->navitia_sam->getLines($coverageId, $networkId, 1, $count);
        // no line found for this network
        if (empty($result) || !isset($result->lines)) {
            throw new \Exception(
                $this->translator->trans(
                    'services.navitia.no_lines_for_network',
                    array('%network%' => $networkId),
                    'exceptions'
                )
            );
        }

        if ($result->pagination->total_result > $count) {
            $result = $this->navitia_sam->getLines(
                $coverageId,
                $networkId,
                1,
                $result->pagination->total_result
            );
        }

        $lines_by_modes = array();
        foreach ($result->lines as $line) {
            if (!isset($lines_by_modes[$line->commercial_mode->id])) {
                $lines_by_modes[$line->commercial_mode->id] = array();
            }
            $lines_by_modes[$line->commercial_mode->id][] = $line;
        }

        return $lines_by_modes;
    }