Issue Task Closed

#109408Minor code cleanups in EXT:form

Josua Vogel 03/27/26, 16:11 updated 03/31/26, 08:09

Description

Several small code quality improvements across the form extension:

  • Avoid redundant calls to count(), formatSize() and DateTime::format() in validators by storing results in local variables
  • Replace isset() && is_array() with the simpler is_array($x ?? null) pattern throughout
  • Replace ?? false with ?? null as fallback in is_array() checks
  • Remove unnecessary global-namespace backslashes (\is_array) on built-in functions
  • Use new FinisherVariableProvider() instead of GeneralUtility::makeInstance() since the class is final and has no constructor arguments
  • In AbstractFinisher::setFinisherIdentifier(), use the method parameter directly in preg_replace() instead of reading back $this->finisherIdentifier
  • Simplify the @var docblock for $finisherContext by removing the unnecessary fully-qualified class name

Reviews 1

History 23

  1. Gerrit Code Review pushed patch set 1 for main to change 93406 status New Under Review 03/27/26, 16:12

  2. Josua Vogel commented and changed status Under Review Resolved done 0 % 100 % 03/30/26, 11:05

    Applied in changeset commit:5007ce475611421d607610ac82de37369e3c31b2.

  3. Benni Mack changed status Resolved Closed 03/31/26, 08:09