Constructor promotion

Created on 7 May 2024, 9 months ago
Updated 21 May 2024, 8 months ago

Problem/Motivation

The DarkmodeSwitcherBlock.php currently uses a regular constructor to initialize its properties. This pattern of declaring and initializing properties separately within the constructor can make the code harder to read and maintain, especially as the number of properties grows.

Proposed resolution

Add a constructor promotion to the DarkmodeSwitcherBlock.php to reduce the amount of repetitive code and to improve readability.

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024