protected function normalizeQuestions(array $questions) {
    return array_map(function ($question) {
      // Support array syntax.
      if (is_array($question)) {
        if (count($question) > 2) {
          throw new \OutOfBoundsException('The question array is too long.');
        }
        list($question_text, $default_value) = array_pad($question, 2, NULL);
        $question = new Question($question_text, $default_value);
      }
      return $question;
    }, $questions);
  }