Method Drupal\consumers\Entity\Form\ConsumerForm::save() should return int but return statement is missing

Created on 7 May 2024, 7 months ago
Updated 22 May 2024, 6 months ago

Problem/Motivation

According to phanstan report I found the following issue:

 Line   consumers/src/Entity/Form/ConsumerForm.php
 ------ -------------------------------------------------------------------------------------------------------------
  58     Method Drupal\consumers\Entity\Form\ConsumerForm::save() should return int but return statement is missing.

Proposed resolution

According to EntityFormInterface returned value of save() method should be int type (either SAVED_NEW or SAVED_UPDATED, depending on the operation performed). So we need to add return $status to the method Drupal\consumers\Entity\Form\ConsumerForm::save().

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ΎBelarus alena_stanul

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

  • PHP 8.0

    The issue particularly affects sites running on PHP version 8.0.0 or later.

  • PHP 8.2

    The issue particularly affects sites running on PHP version 8.2.0 or later.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024