Problem/Motivation

Part of effort #1577902: [META] Remove all usages of drupal_static() & drupal_static_reset() for file_test.module.

Proposed resolution

Remove usage of drupal_static() & drupal_static_reset() from file_test.module. It can be replaced with the static statement as is used only for testing and it's a procedural code.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

N/A

Comments

claudiu.cristea created an issue. See original summary.

claudiu.cristea’s picture

Status: Needs work » Needs review
StatusFileSize
new1.25 KB

Patch.

andypost’s picture

Status: Needs review » Reviewed & tested by the community

Nice

catch’s picture

Status: Reviewed & tested by the community » Needs work

Getting this from Drupal cs, otherwise looks good:

ILE: ...core/modules/file/tests/file_test/file_test.module
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 334 | ERROR | Function return type is not void, but function is
     |       | returning void here
----------------------------------------------------------------------
claudiu.cristea’s picture

Status: Needs work » Needs review
StatusFileSize
new1.27 KB
new568 bytes

Missed the coding standards warning.

andypost’s picture

Status: Needs review » Reviewed & tested by the community
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed a33e47e and pushed to 8.7.x. Thanks!

  • catch committed a33e47e on 8.7.x
    Issue #3035361 by claudiu.cristea: Remove usages of drupal_static()...

Status: Fixed » Closed (fixed)

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