FileRepo: Use Late Static Binding in File static constructors
[lhc/web/wiklou.git] / includes / debug / logger / monolog / KafkaHandler.php
index 6670fe9..ef447d1 100644 (file)
@@ -128,7 +128,7 @@ class KafkaHandler extends AbstractProcessingHandler {
        }
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        protected function write( array $record ) {
                if ( $record['formatted'] !== null ) {
@@ -138,7 +138,7 @@ class KafkaHandler extends AbstractProcessingHandler {
        }
 
        /**
-        * {@inheritDoc}
+        * @inheritDoc
         */
        public function handleBatch( array $batch ) {
                $channels = [];
@@ -254,11 +254,7 @@ class KafkaHandler extends AbstractProcessingHandler {
         * @param array $records List of records to append
         */
        protected function addMessages( $channel, array $records ) {
-               if ( isset( $this->options['alias'][$channel] ) ) {
-                       $topic = $this->options['alias'][$channel];
-               } else {
-                       $topic = "monolog_$channel";
-               }
+               $topic = $this->options['alias'][$channel] ?? "monolog_$channel";
                $partition = $this->getRandomPartition( $topic );
                if ( $partition !== null ) {
                        $this->produce->setMessages( $topic, $partition, $records );