Skip to content

[Code Quality] BinaryComposer::MAGIC_BYTES is public but used only internally #363

@s2x

Description

@s2x

Location

src/Phar/BinaryComposer.php:17

Problem

The MAGIC_BYTES constant is declared public but no code outside BinaryComposer references it. Exposing internal constants widens the public API by accident.

What to change

  • Reduce the constant's visibility to private (or protected if subclasses are expected).
  • If external consumers genuinely need it, document the use case and keep public.

Acceptance criteria

  • MAGIC_BYTES is private (preferred) or protected, unless a documented external consumer exists.
  • Existing tests pass (vendor/bin/phpunit).
  • No behavioural change observable to users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    code-qualityCode quality improvementsminorMinor priority - code quality

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions