protected function classCodeBody() {
    $code_body = array();

    // Class body always has at least one blank line.
    $code_body[] = '';

    // Let the class collect its section blocks.
    $this->collectSectionBlocks();

    $section_types = [
      // These are the names of class properties.
      // TODO: change these to being roles in the child components.
      'traits',
      'constants',
      'properties',
      'constructor',
      'functions',
    ];
    foreach ($section_types as $section_type) {
      $section_blocks = $this->getSectionBlocks($section_type);
      $code_body = array_merge($code_body, $this->mergeSectionCode($section_blocks));
    }

    // Indent all the class code.
    // TODO: is there a nice way of doing indents?
    $code_body = array_map(function ($line) {
      return empty($line) ? $line : '  ' . $line;
    }, $code_body);

    return $code_body;
  }