#!/bin/bash ## usage: bash cleanup-Drupal.Functions.FunctionDeclaration.SpaceBeforeParenthesis.sh vi ## usage: bash cleanup-Drupal.Functions.FunctionDeclaration.SpaceBeforeParenthesis.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.Functions.FunctionDeclaration.SpaceBeforeParenthesis' echo Number of lines: 12 echo Examples: 'Array ( [0] => Space before opening parenthesis of function definition prohibited ) ' echo Press ENTER to begin read edit_at_line 'CRM/Utils/Cache/SerializeCache.php' 55 edit_at_line 'CRM/Utils/Cache/SerializeCache.php' 67 edit_at_line 'CRM/Utils/REST.php' 473 edit_at_line 'tests/phpunit/CRM/Group/Page/AjaxTest.php' 245 edit_at_line 'tests/phpunit/CRM/Group/Page/AjaxTest.php' 253 edit_at_line 'tests/phpunit/CRM/Group/Page/AjaxTest.php' 261 edit_at_line 'tests/phpunit/CRM/Group/Page/AjaxTest.php' 271 edit_at_line 'tests/phpunit/CRM/Group/Page/AjaxTest.php' 280 edit_at_line 'tests/phpunit/CRM/Group/Page/AjaxTest.php' 290 edit_at_line 'tests/phpunit/CRM/Group/Page/AjaxTest.php' 299 edit_at_line 'tests/phpunit/CRM/Group/Page/AjaxTest.php' 308 edit_at_line 'tests/phpunit/WebTest/Contribute/OnlineContributionTest.php' 181