private function extractReturnType(): void
  {
    // Return immediately if designation type is not appropriate for this method.
    if (!in_array($this->designationType, ['function', 'singleton0', 'singleton1'])) return;

    $key = array_search('begin', $this->routineSourceCodeLines);

    if ($key!==false)
    {
      for ($i = 1; $i<$key; $i++)
      {
        $n = preg_match('/^\s*--\s+return:\s*((\w|\|)+)\s*$/',
                        $this->routineSourceCodeLines[$key - $i],
                        $matches);
        if ($n==1)
        {
          $this->returnType = $matches[1];

          break;
        }
      }
    }

    if ($this->returnType===null)
    {
      $this->returnType = 'mixed';

      $this->io->logNote('Unable to find the return type of stored routine');
    }
  }