How to implement dependency injection?

Hey,

I am new to Drupal module development. I created a module and scanned it with phpcs for DrupalPractice standards, it said that I should implement dependency injection in my block. But, I am unsure of how to do it. Here is my code (block):

<?php

namespace Drupalname_form_messengerPluginBlock;

use DrupalCoreBlockBlockBase;
use DrupalCoreFormFormStateInterface;

/**
* Asks user's name and then displays it back.
*
* @Block(
* id = "name_form_messenger",
* admin_label = @Translation("Name Form"),
* )
*/
class NameFormMessengerBlock extends BlockBase {

/**
* {@inheritdoc}
*/
public function build() {
return Drupal::formBuilder()->getForm('Drupalname_form_messengerFormNameFormMessenger');
}

/**
* {@inheritdoc}
*/
public function blockForm($form, FormStateInterface $form_state) {

$form = parent::blockForm($form, $form_state);

return $form;
}

}

How do I implement dependency injection in it?

Thank you

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/4/feed