#!/bin/bash ## usage: bash cleanup-Drupal.WhiteSpace.ScopeClosingBrace.Indent.sh vi ## usage: bash cleanup-Drupal.WhiteSpace.ScopeClosingBrace.Indent.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 'Drupal.WhiteSpace.ScopeClosingBrace.Indent' echo Number of lines: 28 echo Examples: 'Array ( [0] => Closing brace indented incorrectly; expected 4 spaces, found 3 [1] => Closing brace indented incorrectly; expected 10 spaces, found 8 [2] => Closing brace indented incorrectly; expected 8 spaces, found 6 [3] => Closing brace indented incorrectly; expected 6 spaces, found 4 [4] => Closing brace indented incorrectly; expected 4 spaces, found 2 [5] => Closing brace indented incorrectly; expected 10 spaces, found 12 [6] => Closing brace indented incorrectly; expected 8 spaces, found 10 [7] => Closing brace indented incorrectly; expected 6 spaces, found 8 [8] => Closing brace indented incorrectly; expected 5 spaces, found 4 [9] => Closing brace indented incorrectly; expected 3 spaces, found 2 [10] => Closing brace indented incorrectly; expected 24 spaces, found 12 [11] => Closing brace indented incorrectly; expected 7 spaces, found 6 [12] => Closing brace indented incorrectly; expected 2 spaces, found 4 [13] => Closing brace indented incorrectly; expected 4 spaces, found 6 [14] => Closing brace indented incorrectly; expected 4 spaces, found 8 ) ' echo Press ENTER to begin read edit_at_line 'CRM/Campaign/PseudoConstant.php' 164 edit_at_line 'CRM/Contact/BAO/Contact/Utils.php' 862 edit_at_line 'CRM/Contact/BAO/Contact/Utils.php' 863 edit_at_line 'CRM/Contact/BAO/Contact/Utils.php' 864 edit_at_line 'CRM/Contact/BAO/Contact/Utils.php' 865 edit_at_line 'CRM/Contact/BAO/SavedSearch.php' 175 edit_at_line 'CRM/Contact/Form/Inline/Email.php' 79 edit_at_line 'CRM/Contact/Form/Inline/Email.php' 119 edit_at_line 'CRM/Contact/Form/Inline/Email.php' 120 edit_at_line 'CRM/Contact/Form/Inline/Email.php' 121 edit_at_line 'CRM/Contact/Form/Inline/Phone.php' 79 edit_at_line 'CRM/Contact/Form/Merge.php' 345 edit_at_line 'CRM/Contact/Form/Task/AlterPreferences.php' 62 edit_at_line 'CRM/Contact/Form/Task/Label.php' 296 edit_at_line 'CRM/Contact/Form/Task/Label.php' 371 edit_at_line 'CRM/Contact/Form/Task/LabelCommon.php' 335 edit_at_line 'CRM/Contribute/BAO/Query.php' 875 edit_at_line 'CRM/Contribute/Form/Contribution.php' 975 edit_at_line 'CRM/Contribute/Form/UpdateSubscription.php' 305 edit_at_line 'CRM/Contribute/PseudoConstant.php' 199 edit_at_line 'CRM/Core/I18n/Schema.php' 232 edit_at_line 'CRM/Core/I18n/Schema.php' 236 edit_at_line 'CRM/Core/I18n/SchemaStructure_4_2_alpha1.php' 179 edit_at_line 'CRM/Core/I18n/SchemaStructure_4_2_alpha1.php' 181 edit_at_line 'CRM/Event/Page/EventInfo.php' 170 edit_at_line 'CRM/Event/PseudoConstant.php' 305 edit_at_line 'CRM/Member/PseudoConstant.php' 137 edit_at_line 'CRM/Upgrade/Incremental/php/FourSix.php' 74