Skip to content

[Improvement]: Use typed class constants (public const <type>) instead of untyped const #93

@solverat

Description

@solverat

Improvement description

To improve type safety and make the code more explicit, class constants should use typed constants where possible.

Instead of declaring constants without a type, we should explicitly define the type using public const .

Example

# before
const ATTRIBUTE_OPENDXP_STATIC_PAGE = '_opendxp_static_page';
# after
public const string ATTRIBUTE_OPENDXP_STATIC_PAGE = '_opendxp_static_page';

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions