Skip to content

Commit

Permalink
redis db driver: fixed core/redisdb/command typos
Browse files Browse the repository at this point in the history
  • Loading branch information
asafo committed Feb 8, 2024
1 parent b807e28 commit 0945255
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/classes/redisdb/command.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ public abstract function exec(\Redis $redis);

class set extends command {
public function exec(\Redis $redis) : \Redis {
error_log('redisdb:command:set -> ' . $this->keyval->key);
return redis->set($this->keyval->$key, $keyval->$val[0]);
return redis->set($this->keyval->$key, $this->keyval->$val[0]);
}

public function __toString(): string {
Expand All @@ -71,11 +70,10 @@ public function __toString(): string {

class sadd extends command {
public function exec(\Redis $redis) : \Redis {
error_log('redisdb:command:sadd -> ' . $this->keyval->key);
return $redis->sAdd($this->keyval->key, ...$this->$val);
return $redis->sAdd($this->keyval->key, ...($this->keyval->val));
}

public function __toString(): string {
return 'SADD ' . $this->keyval->key . implode(' ', $this->val);
return 'SADD ' . $this->keyval->key . implode(' ', $this->keyval->val);
}
}

0 comments on commit 0945255

Please sign in to comment.