Documentation

AssignmentInConditionSniff.php

Detects variable assignments being made within conditions.

This is a typical code smell and more often than not a comparison was intended.

Note: this sniff does not detect variable assignments in the conditional part of ternaries!

Tags
author

Juliette Reinders Folmer phpcs_nospam@adviesenzo.nl

copyright

2017 Juliette Reinders Folmer. All rights reserved.

license

https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence

Interfaces, Classes and Traits

AssignmentInConditionSniff

Search results