private function readPatterns(string $filename): array
  {
    $path  = $this->basedir.'/'.$filename;
    $lines = explode(PHP_EOL, file_get_contents($path));

    $patterns = [];
    foreach ($lines as $line)
    {
      $line = trim($line);
      if ($line<>'')
      {
        $patterns[] = $line;
      }
    }

    return $patterns;
  }