original_string: public function getPermissions(array $params = []): Collection
      {
          if ($this->permissions === null) {
              $this->permissions = $this->cache->remember(self::$cacheKey, self::$cacheExpirationTime, function () {
                  return $this->getPermissionClass()
                      ->with('roles')
                      ->get();
              });
          }
  
          $permissions = clone $this->permissions;
  
          foreach ($params as $attr => $value) {
              $permissions = $permissions->where($attr, $value);
          }
  
          return $permissions;
      }
code: public function getPermissions(array $params = []): Collection
      {
          if ($this->permissions === null) {
              $this->permissions = $this->cache->remember(self::$cacheKey, self::$cacheExpirationTime, function () {
                  return $this->getPermissionClass()
                      ->with('roles')
                      ->get();
              });
          }
  
          $permissions = clone $this->permissions;
  
          foreach ($params as $attr => $value) {
              $permissions = $permissions->where($attr, $value);
          }
  
          return $permissions;
      }
code_tokens: public function getPermissions ( array $ params = [ ] ) : Collection { if ( $ this -> permissions === null ) { $ this -> permissions = $ this -> cache -> remember ( self :: $ cacheKey , self :: $ cacheExpirationTime , function ( ) { return $ this -> getPermissionClass ( ) -> with ( 'roles' ) -> get ( ) ; } ) ; } $ permissions = clone $ this -> permissions ; foreach ( $ params as $ attr => $ value ) { $ permissions = $ permissions -> where ( $ attr , $ value ) ; } return $ permissions ; }
docstring: Get the permissions based on the passed params.
  
  @param array $params
  
  @return \Illuminate\Support\Collection
docstring_tokens: Get the permissions based on the passed params .