Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.
This repository was archived by the owner on Dec 1, 2024. It is now read-only.

DontReturnFromCloneLinter #546

Description

@lexidor

For rationale, see facebook/hhvm#3757.

Returning a value from __clone() is always a mistake, since the return value is never used. __clone is called on the newly created object before resolving a clone $obj expression.

Checking the return type of the method ought to be enough. No need to actually check the body for returns.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions