Skip to content

Commit

Permalink
update stubs for RdKafka
Browse files Browse the repository at this point in the history
  • Loading branch information
isfedorov committed Aug 14, 2021
1 parent 1f1915b commit a51dd4c
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 deletions.
10 changes: 5 additions & 5 deletions rdkafka/RdKafka.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function getOutQLen() {}
*
* @return Topic
*/
public function newTopic($topic_name, ?TopicConf $topic_conf = null) {}
public function newTopic($topic_name, $topic_conf = null) {}

/**
* @param int $timeout_ms
Expand All @@ -58,7 +58,7 @@ public function setLogLevel($level) {}
*
* @return TopicPartition[]
*/
public function offsetsForTimes(array $topic_partitions, int $timeout_ms) {}
public function offsetsForTimes($topic_partitions, $timeout_ms) {}

/**
* @param string $topic
Expand All @@ -69,21 +69,21 @@ public function offsetsForTimes(array $topic_partitions, int $timeout_ms) {}
*
* @return void
*/
public function queryWatermarkOffsets(string $topic, int $partition = 0, int &$low = 0, int &$high = 0, int $timeout_ms = 0) {}
public function queryWatermarkOffsets($topic, $partition = 0, &$low = 0, &$high = 0, $timeout_ms = 0) {}

/**
* @param int $purge_flags
*
* @return int
*/
public function purge(int $purge_flags) {}
public function purge($purge_flags) {}

/**
* @param int $timeout_ms
*
* @return int
*/
public function flush(int $timeout_ms) {}
public function flush($timeout_ms) {}

public function metadata($all_topics, $only_topic = false, $timeout_ms = 0) {}

Expand Down
16 changes: 8 additions & 8 deletions rdkafka/RdKafka/Conf.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,54 +27,54 @@ public function set($name, $value) {}
*
* @return void
*/
public function setDefaultTopicConf(TopicConf $topic_conf) {}
public function setDefaultTopicConf($topic_conf) {}

/**
* @param callable $callback
*
* @return void
*/
public function setDrMsgCb(callable $callback) {}
public function setDrMsgCb($callback) {}

/**
* @param callable $callback
*
* @return void
*/
public function setErrorCb(callable $callback) {}
public function setErrorCb($callback) {}

/**
* @param callable $callback
*
* @return void
*/
public function setRebalanceCb(callable $callback) {}
public function setRebalanceCb($callback) {}

/**
* @param callable $callback
*
* @return void
*/
public function setStatsCb(callable $callback) {}
public function setStatsCb($callback) {}

/**
* @param callable $callback
*
* @return void
*/
public function setOffsetCommitCb(callable $callback) {}
public function setOffsetCommitCb($callback) {}

/**
* @param callable $callback
*
* @return void
*/
public function setConsumeCb(callable $callback) {}
public function setConsumeCb($callback) {}

/**
* @param callable $callback
*
* @return void
*/
public function setLogCb(callable $callback) {}
public function setLogCb($callback) {}
}
2 changes: 1 addition & 1 deletion rdkafka/RdKafka/Consumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Consumer extends \RdKafka
/**
* @param null|Conf $conf
*/
public function __construct(?Conf $conf = null) {}
public function __construct($conf = null) {}

/**
* @param string $topic_name
Expand Down
2 changes: 1 addition & 1 deletion rdkafka/RdKafka/ConsumerTopic.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function consume($partition, $timeout_ms) {}
*
* @return void
*/
public function consumeQueueStart($partition, $offset, Queue $queue) {}
public function consumeQueueStart($partition, $offset, $queue) {}

/**
* @param int $partition
Expand Down
12 changes: 6 additions & 6 deletions rdkafka/RdKafka/KafkaConsumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class KafkaConsumer
/**
* @param Conf $conf
*/
public function __construct(Conf $conf) {}
public function __construct($conf) {}

/**
* @param TopicPartition[] $topic_partitions
Expand Down Expand Up @@ -83,15 +83,15 @@ public function unsubscribe() {}
*
* @return array
*/
public function getCommittedOffsets(array $topic_partitions, int $timeout_ms) {}
public function getCommittedOffsets($topic_partitions, $timeout_ms) {}

/**
* @param TopicPartition[] $topic_partitions
* @param int $timeout_ms
*
* @return TopicPartition[]
*/
public function offsetsForTimes(array $topic_partitions, int $timeout_ms) {}
public function offsetsForTimes($topic_partitions, $timeout_ms) {}

/**
* @param string $topic
Expand All @@ -102,20 +102,20 @@ public function offsetsForTimes(array $topic_partitions, int $timeout_ms) {}
*
* @return void
*/
public function queryWatermarkOffsets(string $topic, int $partition = 0, int &$low = 0, int &$high = 0, int $timeout_ms = 0) {}
public function queryWatermarkOffsets($topic, $partition = 0, &$low = 0, &$high = 0, $timeout_ms = 0) {}

/**
* @param TopicPartition[] $topic_partitions
*/
public function getOffsetPositions(array $topic_partitions) {}
public function getOffsetPositions($topic_partitions) {}

/**
* @param string $topic_name
* @param null|TopicConf $topic_conf
*
* @return Topic
*/
public function newTopic($topic_name, ?TopicConf $topic_conf = null) {}
public function newTopic($topic_name, $topic_conf = null) {}

/**
* @return void
Expand Down
8 changes: 4 additions & 4 deletions rdkafka/RdKafka/Producer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Producer extends \RdKafka
/**
* @param null|Conf $conf
*/
public function __construct(Conf $conf = null) {}
public function __construct($conf = null) {}

/**
* @param string $topic_name
Expand All @@ -22,7 +22,7 @@ public function newTopic($topic_name, ?TopicConf $topic_conf = null) {}
*
* @return void
*/
public function initTransactions(int $timeout_ms) {}
public function initTransactions($timeout_ms) {}

/**
* @return void
Expand All @@ -34,12 +34,12 @@ public function beginTransaction() {}
*
* @return void
*/
public function commitTransaction(int $timeout_ms) {}
public function commitTransaction($timeout_ms) {}

/**
* @param int $timeout_ms
*
* @return void
*/
public function abortTransaction(int $timeout_ms) {}
public function abortTransaction($timeout_ms) {}
}

0 comments on commit a51dd4c

Please sign in to comment.