Is there a way to add a custom rule for PHP-CS such that the CI pipeline would fail if the boolean operators are not at the beginning of the line through multi-line if statements?
Right:
if (isset($someArray['question'])
&& $this->answerToEverything === 42
|| count($someArray) > 3
) {
$this->fanOfCode = true;
}
Wrong:
if (isset($someArray['question']) &&
$this->answerToEverything === 42 ||
count($someArray) > 3
) {
$this->fanOfCode = true;
}