original_string: protected function addFinder(ContainerBuilder $container, $dir, $bundle)
      {
          $ref = new Reference('integrated_solr.converter.config.provider.file.' . $bundle . '.finder');
  
          if ($container->hasDefinition('integrated_solr.converter.config.provider.file.' . $bundle . '.finder')) {
              return $ref;
          }
  
          $container->addResource(new FileResource($dir)); // not really sure what this does
  
          $definition = new Definition(Finder::class);
          $definition->setPublic(false);
          $definition->addMethodCall('in', [$dir]);
  
          $container->setDefinition('integrated_solr.converter.config.provider.file.' . $bundle . '.finder', $definition);
  
          return $ref;
      }
code: protected function addFinder(ContainerBuilder $container, $dir, $bundle)
      {
          $ref = new Reference('integrated_solr.converter.config.provider.file.' . $bundle . '.finder');
  
          if ($container->hasDefinition('integrated_solr.converter.config.provider.file.' . $bundle . '.finder')) {
              return $ref;
          }
  
          $container->addResource(new FileResource($dir)); // not really sure what this does
  
          $definition = new Definition(Finder::class);
          $definition->setPublic(false);
          $definition->addMethodCall('in', [$dir]);
  
          $container->setDefinition('integrated_solr.converter.config.provider.file.' . $bundle . '.finder', $definition);
  
          return $ref;
      }
code_tokens: protected function addFinder ( ContainerBuilder $ container , $ dir , $ bundle ) { $ ref = new Reference ( 'integrated_solr.converter.config.provider.file.' . $ bundle . '.finder' ) ; if ( $ container -> hasDefinition ( 'integrated_solr.converter.config.provider.file.' . $ bundle . '.finder' ) ) { return $ ref ; } $ container -> addResource ( new FileResource ( $ dir ) ) ; // not really sure what this does $ definition = new Definition ( Finder :: class ) ; $ definition -> setPublic ( false ) ; $ definition -> addMethodCall ( 'in' , [ $ dir ] ) ; $ container -> setDefinition ( 'integrated_solr.converter.config.provider.file.' . $ bundle . '.finder' , $ definition ) ; return $ ref ; }
docstring: Create a finder definition.
  
  Create the definition of a finder instance that will look for files in the bundle. If the finder
  definition already exists then that one is returned.
  
  @param ContainerBuilder $container
  @param string           $dir
  @param string           $bundle
  
  @return Reference
docstring_tokens: Create a finder definition .