Skip to content

Commit 19ea834

Browse files
author
kEERill
committed
[upd] Небольшие исправления в документации и установка модификатора final для одного исключения
1 parent 2417132 commit 19ea834

File tree

6 files changed

+2
-33
lines changed

6 files changed

+2
-33
lines changed

src/Consumers/Consumer.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,17 @@ public function forceStop(): void
4242
$this->highLevelConsumer->forceStop();
4343
}
4444

45-
/**
46-
* @return ProcessorData
47-
*/
4845
public function getProcessorData(): ProcessorData
4946
{
5047
return $this->processorData;
5148
}
5249

53-
/**
54-
* @return ConsumerOptions
55-
*/
5650
public function getConsumerOptions(): ConsumerOptions
5751
{
5852
return $this->consumerOptions;
5953
}
6054

6155
/**
62-
* @return void
63-
*
6456
* @throws Exception
6557
* @throws Throwable
6658
*/

src/Consumers/Factories/ConsumerFactory.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ public function __construct(
1717
}
1818

1919
/**
20-
* @param string $topicKey
21-
* @param string $consumerName
22-
* @return Consumer
23-
*
2420
* @throws KafkaConsumerProcessorException
2521
*/
2622
public function build(string $topicKey, string $consumerName = 'default'): Consumer
@@ -37,10 +33,6 @@ public function build(string $topicKey, string $consumerName = 'default'): Consu
3733
}
3834

3935
/**
40-
* @param string $topicKey
41-
* @param string $consumerName
42-
* @return ProcessorData
43-
*
4436
* @throws KafkaConsumerProcessorException
4537
*/
4638
protected function makeProcessorData(string $topicKey, string $consumerName): ProcessorData
@@ -60,10 +52,6 @@ protected function makeProcessorData(string $topicKey, string $consumerName): Pr
6052
}
6153

6254
/**
63-
* @param string $topicKey
64-
* @param string $consumerName
65-
* @return ProcessorData
66-
*
6755
* @throws KafkaConsumerProcessorException
6856
*/
6957
protected function findMatchedProcessor(string $topicKey, string $consumerName): ProcessorData

src/Exceptions/KafkaConsumerMessagedEndedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
use Exception;
66

7-
class KafkaConsumerMessagedEndedException extends Exception
7+
final class KafkaConsumerMessagedEndedException extends Exception
88
{
99
}

src/HighLevelConsumer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public function listen(string $topicName, ProcessorData $processorData, Consumer
8181
}
8282
}
8383
} catch (KafkaConsumerMessagedEndedException) {
84+
// Called only during testing to stop reading Consumer
8485
}
8586
}
8687

src/Tests/Consumer/KafkaConsumer.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Ensi\LaravelPhpRdKafkaConsumer\Tests\Consumer\Topics\Topic;
88
use RdKafka\Conf;
99
use RdKafka\KafkaConsumer as BaseKafkaConsumer;
10-
use RdKafka\TopicConf;
1110

1211
class KafkaConsumer extends BaseKafkaConsumer
1312
{
@@ -41,11 +40,6 @@ public function consume($timeout_ms)
4140
}
4241

4342
/**
44-
* @param $all_topics
45-
* @param $only_topic
46-
* @param $timeout_ms
47-
* @return Metadata
48-
*
4943
* @phpstan-ignore-next-line
5044
*/
5145
public function getMetadata($all_topics, $only_topic = null, $timeout_ms): Metadata
@@ -59,10 +53,6 @@ public function getCommittedOffsets($topic_partitions, $timeout_ms): array
5953
}
6054

6155
/**
62-
* @param $topic_name
63-
* @param TopicConf|null $topic_conf
64-
* @return Topic
65-
*
6656
* @phpstan-ignore-next-line
6757
*/
6858
public function newTopic($topic_name, $topic_conf = null): Topic

src/Tests/ConsumerFaker.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ public function addMessageRaw(Message $message): self
4040
}
4141

4242
/**
43-
* @return void
44-
*
4543
* @throws KafkaConsumerProcessorException
4644
* @throws Throwable
4745
*/

0 commit comments

Comments
 (0)