original_string: private function loadSonata(ContainerBuilder $container, Loader\XmlFileLoader $loader)
      {
          $bundles = $container->getParameter('kernel.bundles');
  
          if (!isset($bundles['SonataDoctrineORMAdminBundle'])) {
              return; // Sonata not installed
          }
  
          $refl = new \ReflectionMethod('Sonata\\DoctrineORMAdminBundle\\Filter\\StringFilter', 'filter');
  
          if (method_exists($refl, 'getReturnType')) {
              if ($returnType = $refl->getReturnType()) {
                  return; // Not compatible with this Sonata version
              }
          }
  
          $loader->load('sonata.xml');
      }
code: private function loadSonata(ContainerBuilder $container, Loader\XmlFileLoader $loader)
      {
          $bundles = $container->getParameter('kernel.bundles');
  
          if (!isset($bundles['SonataDoctrineORMAdminBundle'])) {
              return; // Sonata not installed
          }
  
          $refl = new \ReflectionMethod('Sonata\\DoctrineORMAdminBundle\\Filter\\StringFilter', 'filter');
  
          if (method_exists($refl, 'getReturnType')) {
              if ($returnType = $refl->getReturnType()) {
                  return; // Not compatible with this Sonata version
              }
          }
  
          $loader->load('sonata.xml');
      }
code_tokens: private function loadSonata ( ContainerBuilder $ container , Loader \ XmlFileLoader $ loader ) { $ bundles = $ container -> getParameter ( 'kernel.bundles' ) ; if ( ! isset ( $ bundles [ 'SonataDoctrineORMAdminBundle' ] ) ) { return ; // Sonata not installed } $ refl = new \ ReflectionMethod ( 'Sonata\\DoctrineORMAdminBundle\\Filter\\StringFilter' , 'filter' ) ; if ( method_exists ( $ refl , 'getReturnType' ) ) { if ( $ returnType = $ refl -> getReturnType ( ) ) { return ; // Not compatible with this Sonata version } } $ loader -> load ( 'sonata.xml' ) ; }
docstring: Load the Sonata configuration, if the versions is supported
  
  @param ContainerBuilder $container
  @param Loader\XmlFileLoader $loader
docstring_tokens: Load the Sonata configuration if the versions is supported