original_string: public function getManagedEntities()
      {
          $entities = array();
          /** @var \Symfony\Component\HttpKernel\Bundle\BundleInterface $bundle */
          foreach ($this->kernel->getBundles() as $bundle) {
              $entityPath = $bundle->getPath() . '/Entity';
              if (is_dir($entityPath)) {
                  $iter = new \RegexIterator(
                      new \RecursiveIteratorIterator(
                          new \RecursiveDirectoryIterator($entityPath)
                      ),
                      '/\.php$/'
                  );
  
                  foreach ($iter as $file) {
                      $entityName = substr(
                          ltrim(str_replace(realpath($entityPath), '', realpath($file->getPathname())), '/'),
                          0,
                          -4
                      );
  
                      $alias = Str::classname(get_class($bundle)) . ':' . str_replace('/', '\\', $entityName);
                      try {
                          $repos = $this->doctrine->getRepository($alias);
  
                          $className     = $repos->getClassName();
                          $classMetaData = $this->metadata->getMetadataForClass($className);
                          foreach ($classMetaData->propertyMetadata as $property => $metadata) {
                              if (isset($metadata->fileManager)) {
                                  $entities[] = $alias;
                                  break;
                              }
                          }
                      } catch (\Exception $e) {
                      }
                  }
              }
          }
  
          return $entities;
      }
code: public function getManagedEntities()
      {
          $entities = array();
          /** @var \Symfony\Component\HttpKernel\Bundle\BundleInterface $bundle */
          foreach ($this->kernel->getBundles() as $bundle) {
              $entityPath = $bundle->getPath() . '/Entity';
              if (is_dir($entityPath)) {
                  $iter = new \RegexIterator(
                      new \RecursiveIteratorIterator(
                          new \RecursiveDirectoryIterator($entityPath)
                      ),
                      '/\.php$/'
                  );
  
                  foreach ($iter as $file) {
                      $entityName = substr(
                          ltrim(str_replace(realpath($entityPath), '', realpath($file->getPathname())), '/'),
                          0,
                          -4
                      );
  
                      $alias = Str::classname(get_class($bundle)) . ':' . str_replace('/', '\\', $entityName);
                      try {
                          $repos = $this->doctrine->getRepository($alias);
  
                          $className     = $repos->getClassName();
                          $classMetaData = $this->metadata->getMetadataForClass($className);
                          foreach ($classMetaData->propertyMetadata as $property => $metadata) {
                              if (isset($metadata->fileManager)) {
                                  $entities[] = $alias;
                                  break;
                              }
                          }
                      } catch (\Exception $e) {
                      }
                  }
              }
          }
  
          return $entities;
      }
code_tokens: public function getManagedEntities ( ) { $ entities = array ( ) ; /** @var \Symfony\Component\HttpKernel\Bundle\BundleInterface $bundle */ foreach ( $ this -> kernel -> getBundles ( ) as $ bundle ) { $ entityPath = $ bundle -> getPath ( ) . '/Entity' ; if ( is_dir ( $ entityPath ) ) { $ iter = new \ RegexIterator ( new \ RecursiveIteratorIterator ( new \ RecursiveDirectoryIterator ( $ entityPath ) ) , '/\.php$/' ) ; foreach ( $ iter as $ file ) { $ entityName = substr ( ltrim ( str_replace ( realpath ( $ entityPath ) , '' , realpath ( $ file -> getPathname ( ) ) ) , '/' ) , 0 , - 4 ) ; $ alias = Str :: classname ( get_class ( $ bundle ) ) . ':' . str_replace ( '/' , '\\' , $ entityName ) ; try { $ repos = $ this -> doctrine -> getRepository ( $ alias ) ; $ className = $ repos -> getClassName ( ) ; $ classMetaData = $ this -> metadata -> getMetadataForClass ( $ className ) ; foreach ( $ classMetaData -> propertyMetadata as $ property => $ metadata ) { if ( isset ( $ metadata -> fileManager ) ) { $ entities [ ] = $ alias ; break ; } } } catch ( \ Exception $ e ) { } } } } return $ entities ; }
docstring: Returns all entities having file annotations
  
  @return array
docstring_tokens: Returns all entities having file annotations