Skip to content

Refactor ->add() methods to ::addTo() #930

@mvorisek

Description

@mvorisek

Complete after: #929

All <parent>->add([<class, ...<seed>>]) methods that accepts seeds other than object variables should be refactored to use the new <class>::addTo(<parent>, <seed>) to enforce refactoring support.

Regex for the most commonly used cases:

= ?.+->add\((?!\$)|->add\((?!\$)[^;]*\)->

In future we may want to accept only objects in the View:add() method and return $this from it.

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