original_string: public function getGroupPermissions($resource): array
      {
          if ($resource instanceof ResourceInterface) {
              return $this->groupPermissions->getResourcePermissions($resource);
          }
  
          if (\is_string($resource)) {
              return $this->groupPermissions->getPermissions($resource);
          }
  
          throw new UnknownResourceTypeException(\get_class($resource));
      }
code: public function getGroupPermissions($resource): array
      {
          if ($resource instanceof ResourceInterface) {
              return $this->groupPermissions->getResourcePermissions($resource);
          }
  
          if (\is_string($resource)) {
              return $this->groupPermissions->getPermissions($resource);
          }
  
          throw new UnknownResourceTypeException(\get_class($resource));
      }
code_tokens: public function getGroupPermissions ( $ resource ) : array { if ( $ resource instanceof ResourceInterface ) { return $ this -> groupPermissions -> getResourcePermissions ( $ resource ) ; } if ( \ is_string ( $ resource ) ) { return $ this -> groupPermissions -> getPermissions ( $ resource ) ; } throw new UnknownResourceTypeException ( \ get_class ( $ resource ) ) ; }
docstring: Permissions are an ability to do 'something' with either a 'string' or ResourceInterface as the subject.  Some
  permissions are attributed to roles, as defined by your role provider.  This method checks to see if the set of
  roles associated to your user, grants access to a specific verb-actions on a resource.
  
  @param ResourceInterface|string $resource
  
  @return GroupPermissionInterface[]
  @throws UnknownResourceTypeException
docstring_tokens: Permissions are an ability to do something with either a string or ResourceInterface as the subject . Some permissions are attributed to roles as defined by your role provider . This method checks to see if the set of roles associated to your user grants access to a specific verb - actions on a resource .