#!/bin/bash ## usage: bash cleanup-Squiz.Commenting.DocCommentAlignment.SpaceBeforeStar.sh vi ## usage: bash cleanup-Squiz.Commenting.DocCommentAlignment.SpaceBeforeStar.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.Commenting.DocCommentAlignment.SpaceBeforeStar' echo Number of lines: 4 echo Examples: 'Array ( [0] => Expected 3 space(s) before asterisk; 4 found ) ' echo Press ENTER to begin read edit_at_line 'tests/phpunit/api/v3/ContactTest.php' 1689 edit_at_line 'tests/phpunit/api/v3/ContactTest.php' 1690 edit_at_line 'tests/phpunit/api/v3/ContactTest.php' 1704 edit_at_line 'tests/phpunit/api/v3/ContactTest.php' 1705