Skip to content

[New Rule] Getters SHOULD NOT change the state of an object #26

Closed
@lenaorobei

Description

@lenaorobei

Rule

Getters SHOULD NOT change the state of an object.

Reason

Source: Magento Technical Guidelines.

Implementation

Check if method name starts with get and find class member assignment operation inside this method.

<severity>8</severity>
<type>warning</type>

Metadata

Metadata

Assignees

Labels

acceptedNew rule is acceptedevent: MageTestFest2019MageTestFest contributionsfalse positiveRule causes false positive findingsneed to discussRule requires discussionnew ruleNew feature implementationtechnical guidelinesThe rule is based on Magento Technical Guidelines

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions