#!/bin/bash ## usage: bash cleanup-Squiz.Arrays.ArrayDeclaration.SpaceAfterComma.sh vi ## usage: bash cleanup-Squiz.Arrays.ArrayDeclaration.SpaceAfterComma.sh joe [ -n "$1" ] && EDITOR="$1" if [ -z "$EDITOR" ]; then echo "Please provide parameter 1 (editor). Example: vi, joe" exit 1 fi function edit_at_line() { local f="$1" local l="$2" $EDITOR +$l "$f" } echo Process cleanup for 'Squiz.Arrays.ArrayDeclaration.SpaceAfterComma' echo Number of lines: 1 echo Examples: 'Array ( [0] => Expected 1 space between comma and \"'\''event_is_public'\''\"; 2 found ) ' echo Press ENTER to begin read edit_at_line 'CRM/Event/BAO/Query.php' 383