Skip to content
This repository was archived by the owner on Oct 27, 2025. It is now read-only.

Commit 443ab7c

Browse files
committed
chore: fix cs in examples
1 parent 02821b0 commit 443ab7c

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

examples/consumer-lowlevel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function (Consumer $consumer, int $level, string $facility, string $message): vo
2020
}
2121
);
2222

23-
$conf->set('statistics.interval.ms', (string)1000);
23+
$conf->set('statistics.interval.ms', (string) 1000);
2424
$conf->setStatsCb(
2525
function (Consumer $consumer, string $json, int $jsonLength, $opaque): void {
2626
echo "stats: ${json}" . PHP_EOL;
@@ -29,7 +29,7 @@ function (Consumer $consumer, string $json, int $jsonLength, $opaque): void {
2929

3030
$topicConf = new TopicConf();
3131
$topicConf->set('enable.auto.commit', 'true');
32-
$topicConf->set('auto.commit.interval.ms', (string)100);
32+
$topicConf->set('auto.commit.interval.ms', (string) 100);
3333
$topicConf->set('auto.offset.reset', 'earliest');
3434
var_dump($topicConf->dump());
3535

examples/create-topic.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@
2929
$conf = new Conf();
3030
$conf->set('bootstrap.servers', $options['b']);
3131
$client = Client::fromConf($conf);
32-
$client->setWaitForResultEventTimeout((int)$options['w']);
32+
$client->setWaitForResultEventTimeout((int) $options['w']);
3333
$partitions = $options['p'];
3434
$replicationFactor = $options['r'];
3535

3636
$results = $client->createTopics(
3737
[
3838
new NewTopic(
39-
(string)$options['t'],
40-
(int)$partitions,
41-
(int)$replicationFactor
39+
(string) $options['t'],
40+
(int) $partitions,
41+
(int) $replicationFactor
4242
),
4343
]
4444
);

examples/delete-topic.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
$conf = new Conf();
2828
$conf->set('bootstrap.servers', $options['b']);
2929
$client = Client::fromConf($conf);
30-
$client->setWaitForResultEventTimeout((int)$options['w']);
30+
$client->setWaitForResultEventTimeout((int) $options['w']);
3131

3232
$results = $client->deleteTopics(
3333
[
3434
new DeleteTopic(
35-
(string)$options['t']
35+
(string) $options['t']
3636
),
3737
]
3838
);

examples/describe-config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
$results = $client->describeConfigs(
3434
[
35-
new ConfigResource((int)$options['t'], (string)$options['v']),
35+
new ConfigResource((int) $options['t'], (string) $options['v']),
3636
]
3737
);
3838

examples/metadata.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
declare(strict_types=1);
44

55
use RdKafka\Conf;
6-
use RdKafka\FFI\Library;
76
use RdKafka\Producer;
87

98
require_once dirname(__DIR__) . '/vendor/autoload.php';

0 commit comments

Comments
 (0)