Verified Commit ecc804c8 authored by Andrei Mateescu's avatar Andrei Mateescu
Browse files

task: #3586161 Add missing void return types to test modules

By: mstrelan
By: smustgrave
parent db370520
Loading
Loading
Loading
Loading
Loading
+20 −1598

File changed.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ class BigPipeTestSubscriber implements EventSubscriberInterface {
   *
   * @see \Drupal\big_pipe_test\BigPipeTestController::responseException()
   */
  public function onRespondTriggerException(ResponseEvent $event) {
  public function onRespondTriggerException(ResponseEvent $event): void {
    $response = $event->getResponse();

    if (!$response instanceof AttachmentsInterface) {
@@ -53,7 +53,7 @@ public function onRespondTriggerException(ResponseEvent $event) {
   * @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
   *   The event to process.
   */
  public function onRespondSetBigPipeDebugPlaceholderHeaders(ResponseEvent $event) {
  public function onRespondSetBigPipeDebugPlaceholderHeaders(ResponseEvent $event): void {
    $response = $event->getResponse();
    if (!$response instanceof HtmlResponse) {
      return;
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
  /**
   * {@inheritdoc}
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
  public function submitForm(array &$form, FormStateInterface $form_state): void {
    $this->messenger()->addStatus($this->t('Your favorite animal is: @favorite_animal', ['@favorite_animal' => $form['favorite_animal']['#value']]));
  }

+2 −2
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
  /**
   * {@inheritdoc}
   */
  public function validateForm(array &$form, FormStateInterface $form_state) {
  public function validateForm(array &$form, FormStateInterface $form_state): void {
    if (!str_contains($form_state->getValue('email'), '.com')) {
      $form_state->setErrorByName('email', $this->t('This is not a .com email address.'));
    }
@@ -50,7 +50,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
  /**
   * {@inheritdoc}
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
  public function submitForm(array &$form, FormStateInterface $form_state): void {
    $this->messenger()->addStatus($this->t('Your email address is @email', ['@email' => $form['email']['#value']]));
  }

+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ public function blockForm($form, FormStateInterface $form_state) {
  /**
   * {@inheritdoc}
   */
  public function blockSubmit($form, FormStateInterface $form_state) {
  public function blockSubmit($form, FormStateInterface $form_state): void {
    $this->configuration['display_message'] = $form_state->getValue('display_message');
  }

Loading