Skip to content

Inconsistent naming conventions for singleton design pattern #8

@tommens

Description

@tommens

Describe the problem

This code is using the state design pattern, where a singleton pattern is used for creating each state. However, the naming convention for this singleton pattern is not implemented consistently: sometimes the method getInstance() is used for creating a new unique instance of the state, and sometimes the method Instance() is used for doing so.

Propose a solution
Apply a refactoring to rename all state creation methods consistently, either using the getInstance() method or using the Instance() method.
This refactoring requires making changes in many classes throughout the code, but also in all test files. Therefore, the use of an automated refactoring tool is recommended.

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactoringChanges that improve the code structure but preserve its behaviour

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions