This is a simple one. The regex includes private twice, but I suspect one should be protected.
" handle class methods and independent functions
if line =~? '\v\s*(abstract\s+|public\s+|private\s+|static\s+|private\s+)*function\s+(\k|\()' && line !~? ';$'
This is a simple one. The regex includes private twice, but I suspect one should be protected.