#!/bin/bash ## usage: bash cleanup-Drupal.Array.Array.ArrayClosingIndentation.sh vi ## usage: bash cleanup-Drupal.Array.Array.ArrayClosingIndentation.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.Array.Array.ArrayClosingIndentation' echo Number of lines: 39 echo Examples: 'Array ( [0] => Array closing indentation error, expected 4 spaces but found 6 [1] => Array closing indentation error, expected 6 spaces but found 8 [2] => Array closing indentation error, expected 10 spaces but found 12 [3] => Array closing indentation error, expected 8 spaces but found 10 [4] => Array closing indentation error, expected 12 spaces but found 14 [5] => Array closing indentation error, expected 2 spaces but found 4 [6] => Array closing indentation error, expected 2 spaces but found 6 [7] => Array closing indentation error, expected 2 spaces but found 3 ) ' echo Press ENTER to begin read edit_at_line 'CRM/ACL/Form/ACL.php' 161 edit_at_line 'CRM/ACL/Form/ACL.php' 167 edit_at_line 'CRM/ACL/Form/ACL.php' 172 edit_at_line 'CRM/ACL/Form/ACL.php' 177 edit_at_line 'CRM/ACL/Form/ACL.php' 182 edit_at_line 'CRM/ACL/Form/ACLBasic.php' 100 edit_at_line 'CRM/ACL/Page/ACL.php' 180 edit_at_line 'CRM/ACL/Page/ACL.php' 184 edit_at_line 'CRM/ACL/Page/ACL.php' 188 edit_at_line 'CRM/ACL/Page/ACL.php' 193 edit_at_line 'CRM/Case/Form/Activity.php' 286 edit_at_line 'CRM/Contact/Form/Search/Custom/FullText/AbstractPartialQuery.php' 166 edit_at_line 'CRM/Contact/Page/View/Summary.php' 370 edit_at_line 'CRM/Core/BAO/UFGroup.php' 2165 edit_at_line 'CRM/Financial/Form/FinancialTypeAccount.php' 185 edit_at_line 'CRM/Financial/Page/AJAX.php' 91 edit_at_line 'CRM/Report/Form/Activity.php' 304 edit_at_line 'CRM/Report/Form/Campaign/SurveyDetails.php' 103 edit_at_line 'CRM/Report/Form/Contact/Relationship.php' 228 edit_at_line 'CRM/Report/Form/Contact/Summary.php' 159 edit_at_line 'CRM/Report/Form/Contribute/Detail.php' 288 edit_at_line 'CRM/Report/Form/Contribute/History.php' 134 edit_at_line 'CRM/Report/Form/Contribute/Lybunt.php' 122 edit_at_line 'CRM/Report/Form/Contribute/Summary.php' 243 edit_at_line 'CRM/Report/Form/Contribute/Sybunt.php' 114 edit_at_line 'CRM/Report/Form/Contribute/TopDonor.php' 80 edit_at_line 'CRM/Report/Form/Member/ContributionDetail.php' 339 edit_at_line 'CRM/Report/Form/Pledge/Detail.php' 176 edit_at_line 'CRM/Report/Form/Pledge/Summary.php' 171 edit_at_line 'CRM/Report/Form.php' 1130 edit_at_line 'CRM/Upgrade/Incremental/php/ThreeFour.php' 359 edit_at_line 'api/v3/Constant.php' 192 edit_at_line 'api/v3/Contact.php' 88 edit_at_line 'api/v3/Profile.php' 687 edit_at_line 'api/v3/Setting.php' 50 edit_at_line 'api/v3/Setting.php' 227 edit_at_line 'api/v3/Setting.php' 231 edit_at_line 'tests/phpunit/api/v3/ContributionTest.php' 677 edit_at_line 'tests/phpunit/api/v3/ContributionTest.php' 699