Skip to content

Rule: MEQP2.Classes.ConstructorOperations #46

Description

@schmengler

Rule

Only dependency assignment operations are allowed in constructor. No other operations are allowed.

The rule can be included from MEQP2 with severity 5 (default), and needs to be documented with examples.

Reason

Magento instantiates all objects in the dependency graph early (if no proxy is used), so instantiation must 1. be fast and 2. not depend on any application state

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions