More PSR compliant if and foreach statements