Skip to content

PHP 8 bugfixes #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/RedisClient/Client/AbstractRedisClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ protected function executePipeline(PipelineInterface $Pipeline) {
/**
* @inheritdoc
*/
protected function subscribeCommand(array $subCommand, array $unsubCommand, array $params = null, $callback) {
protected function subscribeCommand(array $subCommand, array $unsubCommand, ?array $params, $callback) {
$Protocol = $this->getProtocol();
$Protocol->subscribe($this->getStructure($subCommand, $params), $callback);
return $this->executeProtocolCommand($Protocol, $unsubCommand, $params);
Expand Down
2 changes: 1 addition & 1 deletion src/RedisClient/Command/Traits/AbstractCommandsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ abstract protected function returnCommand(array $command, $keys = null, array $p
* @param \Closure|string|array $callback
* @return mixed
*/
abstract protected function subscribeCommand(array $subCommand, array $unsubCommand, array $params = null, $callback);
abstract protected function subscribeCommand(array $subCommand, array $unsubCommand, ?array $params, $callback);

/**
* @return string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ public function lindex($key, $index) {
* @link http://redis.io/commands/linsert
*
* @param string $key
* @param bool|true $after
* @param bool $after
* @param string $pivot
* @param string $value
* @return int The length of the list after the insert operation,
* or -1 when the value pivot was not found. Or 0 when key was not found.
*/
public function linsert($key, $after = true, $pivot, $value) {
public function linsert($key, $after, $pivot, $value) {
return $this->returnCommand(['LINSERT'], $key, [$key, $after ? 'AFTER' : 'BEFORE', $pivot, $value]);
}

Expand Down
2 changes: 1 addition & 1 deletion src/RedisClient/Pipeline/AbstractPipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected function returnCommand(array $command, $keys = null, array $params = n
/**
* @inheritdoc
*/
protected function subscribeCommand(array $subCommand, array $unsubCommand, array $params = null, $callback) {
protected function subscribeCommand(array $subCommand, array $unsubCommand, ?array $params, $callback) {
throw new ErrorException('Do not use subscribe in pipeline');
}

Expand Down
2 changes: 1 addition & 1 deletion src/RedisClient/Pipeline/Version/Pipeline2x6.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
* @method Pipeline2x6 brpop($keys, $timeout)
* @method Pipeline2x6 brpoplpush($source, $destination, $timeout)
* @method Pipeline2x6 lindex($key, $index)
* @method Pipeline2x6 linsert($key, $after = true, $pivot, $value)
* @method Pipeline2x6 linsert($key, $after, $pivot, $value)
* @method Pipeline2x6 llen($key)
* @method Pipeline2x6 lpop($key)
* @method Pipeline2x6 lpush($key, $values)
Expand Down