protected function readLines(array &$stepActionParams, array &$endpointOptions, array &$context)
    {
        $stepParamsResolver = new OptionsResolver();
        $stepParamsResolver->setRequired([
            self::PARAM_CONTEXT_RESULT_NAME,
        ]);

        $stepParamsResolver->setDefault(self::PARAM_MAX_LINES, 1);
        $stepParamsResolver->setDefault(self::PARAM_FILE_NAME, null);
        $params = $stepParamsResolver->resolve($stepActionParams);

        $fullPath = $this->getRootPath($endpointOptions);
        if (null !== $params[self::PARAM_FILE_NAME]) {
            if (DIRECTORY_SEPARATOR !== substr($fullPath, -1)) {
                $fullPath .= DIRECTORY_SEPARATOR;
            }
            $fullPath .= $params[self::PARAM_FILE_NAME];
        }

        $fileHandle = $this->getFileHandle($fullPath, 'r');

        $contextResultName = $params[self::PARAM_CONTEXT_RESULT_NAME];
        $maxLines = $params[self::PARAM_MAX_LINES];
        $maxLineLength = $endpointOptions[CsvConfigurableProtocol::OPTION_MAX_LENGTH];

        $rows = [];

        $i = 0;
        while ($i < $maxLines) {
            $row = fgetcsv($fileHandle, $maxLineLength, $endpointOptions[CsvConfigurableProtocol::OPTION_DELIMITER]);

            if (false === $row) {
                break;
            }

            $rows[] = $row;
            ++$i;
        }

        if (0 === count($rows)) {
            throw new NoResultsException("No more results from $fullPath");
        }

        $context[self::KEY_RESULTS][$contextResultName] = $rows;
    }