Problem/Motivation

Method signature code style is mixed in the module. Example:

src/Form/MediaRevisionDeleteForm.php

public function __construct(
  RevisionableStorageInterface $media_storage,
  DateFormatterInterface $date_formatter
) {
  $this->mediaStorage = $media_storage;
  $this->dateFormatter = $date_formatter;
}
public function buildForm(array $form, FormStateInterface $form_state, $media_revision = NULL) {
  $this->revision = $this->mediaStorage->loadRevision($media_revision);
  $form = parent::buildForm($form, $form_state);

  return $form;
}

Proposed resolution

Change all method signatures to single line.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

benjamincizej created an issue. See original summary.

ngkoutsaik’s picture

Assigned: Unassigned » ngkoutsaik
ngkoutsaik’s picture

Assigned: ngkoutsaik » Unassigned
Status: Active » Needs review
StatusFileSize
new2.5 KB
bcizej’s picture

Status: Needs review » Needs work

Thanks for the patch but there is a method in test that is still not converted.

tests/src/Functional/MediaRevisionsUiTest.php

  protected function assertRevisionsListStatusCode(
    User $user,
    EntityInterface $media,
    $expectedStatusCode
  ) {
    $this->drupalLogin($user);
    $this->drupalGet("/media/{$media->id()}/revisions");
    $this->assertSession()->statusCodeEquals($expectedStatusCode);
  }
bcizej’s picture

Status: Needs work » Needs review
StatusFileSize
new785 bytes
new3.26 KB

Fixed the missing method.

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for the patch,
I reviewed the patch and ran tests and everything works as expected.

Kind regards, Denis

  • benjamincizej committed 0929c85 on 8.x-1.x
    Issue #3117366 by benjamincizej, ngkoutsaik, DenisCi: Change method...
bcizej’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.