Skip to content

Erlang\Util violates Single Responsibility Principle #7

@HelloGrayson

Description

@HelloGrayson

Looking at the Erlang\Util test case indicates the class has clearly too much responsibility. In an effort to make this area of the app more testable, the following structure is desirable as a starting point:

<?php

namespace Hurricane\Erlang\Util;

interface Encodable {}
interface Decodable {}

class Encoder implements Encodable {}
class Decoder implements Decodable {}

Leaving the classes as static would be the easiest first move. Also, if leaving static, it's possible that interfaces aren't immediately beneficial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions