code: private function cleanNames($source)
      {
          $names = [];
          foreach ($source as $name) {
              if (!is_string($name)) continue;
              $key = str_replace('::', '__', $name);
              $names[$key] = trim($name, '*');
          }
          return $names;
      }
docs: Clean up function names for use in Twig templates
  Returns ['twig name' => 'callable name']
  @param  array $source
  @return array