Problem/Motivation

Let's tighten up the event entity classes to make DX a little nicer.

Proposed resolution

  • Remove boilerplate comments.
  • Some functions are using {@inheritdoc} when they don't actually have a parent or interface to inherit from. Either add those to the EventInterface or document the method.
  • Some methods are overriding methods inherited from a base class that do functionally the same thing; let's get rid of those redundant implementations.
  • Set return types on functions that don't have it.
  • Remove redundant "$this instanceof" checks for interfaces that we already know are in the class hierarchy.
  • Add an EventSeries::getSeriesEnd method (to go with the EventSeries::getSeriesStart method we already have).

API changes

Add EventSeries::getSeriesEnd method.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

muriqui created an issue. See original summary.

muriqui’s picture

Issue summary: View changes
muriqui’s picture

Issue summary: View changes

muriqui’s picture

Status: Active » Needs work
muriqui’s picture

Status: Needs work » Needs review
webbywe’s picture

Status: Needs review » Reviewed & tested by the community

Code Review: Saw no issues during review.
Validation Steps:

  • Log into Tugboat instance
  • Confirmed /admin/structure/events/series/settings (no errors / saves)
  • Confirmed /admin/structure/events/series/types (adding a custom type with fields)
  • Confirmed /admin/structure/events/instance/settings (no errors / saves)
  • Confirmed /events/add for Custom type (Recur type radios work, custom single date works)
  • Confirmed /events/add for Default type (Recur type radios work, consecutive date works)
  • Confirm /admin/content/events/series (loads / no errors)
  • Confirm /admin/content/events/instances (loads / no errors)
  • Confirm no errors or warnings in logs after testing

Tests: Confirmed pipelines are passing

Setting status to RTBC.

  • muriqui committed 50f79022 on 3.0.x
    task: #3611418 Code clean-up on EventSeries and EventInstance entity...
muriqui’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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