original_string: private static function extractEntityDescriptors(EntitiesDescriptor $entity)
      {
          $results = [];
          foreach ($entity->children as $child) {
              if ($child instanceof EntityDescriptor) {
                  $results[] = $child;
                  continue;
              }
  
              $results = array_merge($results, self::extractEntityDescriptors($child));
          }
          return $results;
      }
code: private static function extractEntityDescriptors(EntitiesDescriptor $entity)
      {
          $results = [];
          foreach ($entity->children as $child) {
              if ($child instanceof EntityDescriptor) {
                  $results[] = $child;
                  continue;
              }
  
              $results = array_merge($results, self::extractEntityDescriptors($child));
          }
          return $results;
      }
code_tokens: private static function extractEntityDescriptors ( EntitiesDescriptor $ entity ) { $ results = [ ] ; foreach ( $ entity -> children as $ child ) { if ( $ child instanceof EntityDescriptor ) { $ results [ ] = $ child ; continue ; } $ results = array_merge ( $ results , self :: extractEntityDescriptors ( $ child ) ) ; } return $ results ; }
docstring: Recursively browse the children of an EntitiesDescriptor element looking for EntityDescriptor elements, and
  return an array containing all of them.
  
  @param \SAML2\XML\md\EntitiesDescriptor $entity The source EntitiesDescriptor that holds the entities to extract.
  
  @return array An array containing all the EntityDescriptors found.
docstring_tokens: Recursively browse the children of an EntitiesDescriptor element looking for EntityDescriptor elements and return an array containing all of them .