diff --git a/examples/consumer-lowlevel.php b/examples/consumer-lowlevel.php index 8811a0b..274b0f9 100644 --- a/examples/consumer-lowlevel.php +++ b/examples/consumer-lowlevel.php @@ -20,7 +20,7 @@ function (Consumer $consumer, int $level, string $facility, string $message): vo } ); -$conf->set('statistics.interval.ms', (string)1000); +$conf->set('statistics.interval.ms', (string) 1000); $conf->setStatsCb( function (Consumer $consumer, string $json, int $jsonLength, $opaque): void { echo "stats: ${json}" . PHP_EOL; @@ -29,7 +29,7 @@ function (Consumer $consumer, string $json, int $jsonLength, $opaque): void { $topicConf = new TopicConf(); $topicConf->set('enable.auto.commit', 'true'); -$topicConf->set('auto.commit.interval.ms', (string)100); +$topicConf->set('auto.commit.interval.ms', (string) 100); $topicConf->set('auto.offset.reset', 'earliest'); var_dump($topicConf->dump()); diff --git a/examples/create-topic.php b/examples/create-topic.php index 0fe43b5..118c41e 100644 --- a/examples/create-topic.php +++ b/examples/create-topic.php @@ -29,16 +29,16 @@ $conf = new Conf(); $conf->set('bootstrap.servers', $options['b']); $client = Client::fromConf($conf); -$client->setWaitForResultEventTimeout((int)$options['w']); +$client->setWaitForResultEventTimeout((int) $options['w']); $partitions = $options['p']; $replicationFactor = $options['r']; $results = $client->createTopics( [ new NewTopic( - (string)$options['t'], - (int)$partitions, - (int)$replicationFactor + (string) $options['t'], + (int) $partitions, + (int) $replicationFactor ), ] ); diff --git a/examples/delete-topic.php b/examples/delete-topic.php index 86e851e..be653f4 100644 --- a/examples/delete-topic.php +++ b/examples/delete-topic.php @@ -27,12 +27,12 @@ $conf = new Conf(); $conf->set('bootstrap.servers', $options['b']); $client = Client::fromConf($conf); -$client->setWaitForResultEventTimeout((int)$options['w']); +$client->setWaitForResultEventTimeout((int) $options['w']); $results = $client->deleteTopics( [ new DeleteTopic( - (string)$options['t'] + (string) $options['t'] ), ] ); diff --git a/examples/describe-config.php b/examples/describe-config.php index d7eb743..348f496 100644 --- a/examples/describe-config.php +++ b/examples/describe-config.php @@ -32,7 +32,7 @@ $results = $client->describeConfigs( [ - new ConfigResource((int)$options['t'], (string)$options['v']), + new ConfigResource((int) $options['t'], (string) $options['v']), ] ); diff --git a/examples/metadata.php b/examples/metadata.php index ec656d4..2b25d7d 100644 --- a/examples/metadata.php +++ b/examples/metadata.php @@ -3,7 +3,6 @@ declare(strict_types=1); use RdKafka\Conf; -use RdKafka\FFI\Library; use RdKafka\Producer; require_once dirname(__DIR__) . '/vendor/autoload.php';