original_string: public function match($permissions, array $authzGroups)
      {
          $privileges = [];
  
          foreach ($permissions as $permissionAuthzGroup => $permissionPrivileges) {
              $matchingAuthzGroup = $this->getMatchingAuthzGroup($permissionAuthzGroup, $authzGroups);
              
              if (!$matchingAuthzGroup) {
                  continue;
              }
              
              $privileges[] = $permissionPrivileges;
          }
  
          return $this->flatten($privileges);
      }
code: public function match($permissions, array $authzGroups)
      {
          $privileges = [];
  
          foreach ($permissions as $permissionAuthzGroup => $permissionPrivileges) {
              $matchingAuthzGroup = $this->getMatchingAuthzGroup($permissionAuthzGroup, $authzGroups);
              
              if (!$matchingAuthzGroup) {
                  continue;
              }
              
              $privileges[] = $permissionPrivileges;
          }
  
          return $this->flatten($privileges);
      }
code_tokens: public function match ( $ permissions , array $ authzGroups ) { $ privileges = [ ] ; foreach ( $ permissions as $ permissionAuthzGroup => $ permissionPrivileges ) { $ matchingAuthzGroup = $ this -> getMatchingAuthzGroup ( $ permissionAuthzGroup , $ authzGroups ) ; if ( ! $ matchingAuthzGroup ) { continue ; } $ privileges [ ] = $ permissionPrivileges ; } return $ this -> flatten ( $ privileges ) ; }
docstring: Get a flat list of privileges for matching authz groups
  
  @param array|object $permissions
  @param array        $authzGroups
  @return array
docstring_tokens: Get a flat list of privileges for matching authz groups