I'm looking or a sniff, which detects:
if()
switch()
elseif()
because only
if ()
switch ()
elseif ()
is allowed!
Thanks
I'm looking or a sniff, which detects:
if()
switch()
elseif()
because only
if ()
switch ()
elseif ()
is allowed!
Thanks
You can probably use Squiz_Sniffs_ControlStructures_ControlSignatureSniff
for this, which accepts the following patterns:
try {EOL...} catch (...) {EOL
do {EOL...} while (...);EOL
while (...) {EOL
for (...) {EOL
if (...) {EOL
foreach (...) {EOL
} else if (...) {EOL
} else {EOL
If those signatures are not to your liking, have a look for *_ControlSignaturesSniff
in the other namespaces.