#!/bin/bash ## usage: bash cleanup-Drupal.Commenting.FunctionComment.InvalidReturn.sh vi ## usage: bash cleanup-Drupal.Commenting.FunctionComment.InvalidReturn.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.Commenting.FunctionComment.InvalidReturn' echo Number of lines: 96 echo Examples: 'Array ( [0] => Expected \"bool\" but found \"boolean\" for function return type [1] => Expected \"int|NULL\" but found \"integer|NULL\" for function return type [2] => Expected \"array|bool\" but found \"Array|bool\" for function return type [3] => Expected \"int\" but found \"integer\" for function return type [4] => Expected \"object\" but found \"stdClass\" for function return type [5] => Expected \"int\" but found \"number\" for function return type [6] => Expected \"bool|object Returns either boolean value or CRM_Core_DAO_RecurringEntity object\" but found \"boolean|object Returns either boolean value or CRM_Core_DAO_RecurringEntity object\" for function return type [7] => Expected \"bool\" but found \"Boolean\" for function return type [8] => Expected \"mixed NULL|int\" but found \"mixed NULL|integer\" for function return type [9] => Expected \"void|bool\" but found \"void|boolean\" for function return type [10] => Expected \"void|bool|Ambigous \" but found \"void|boolean|Ambigous \" for function return type [11] => Expected \"array|bool - array on success, FALSE on error.\" but found \"Array|bool - array on success, FALSE on error.\" for function return type [12] => Expected \"bool|null|string|int\" but found \"bool|null|string|number\" for function return type [13] => Expected \"int|NULL contact ID of logged in user\" but found \"integer|NULL contact ID of logged in user\" for function return type [14] => Expected \"string\" but found \"String\" for function return type [15] => Expected \"int|false price_set_id, or false if none found\" but found \"integer|false price_set_id, or false if none found\" for function return type [16] => Expected \"int|NULL price set id on success, null otherwise\" but found \"integer|NULL price set id on success, null otherwise\" for function return type [17] => Expected \"array\" but found \"Array\" for function return type [18] => Expected \"int|string\" but found \"integer|string\" for function return type ) ' echo Press ENTER to begin read edit_at_line 'CRM/Activity/BAO/Activity.php' 64 edit_at_line 'CRM/Activity/Import/Parser/Activity.php' 135 edit_at_line 'CRM/Case/BAO/Case.php' 2359 edit_at_line 'CRM/Case/BAO/Case.php' 3402 edit_at_line 'CRM/Contact/BAO/Contact/Permission.php' 158 edit_at_line 'CRM/Contact/BAO/Contact.php' 3298 edit_at_line 'CRM/Contact/BAO/GroupContact.php' 77 edit_at_line 'CRM/Contact/BAO/GroupContact.php' 805 edit_at_line 'CRM/Contact/BAO/GroupOrganization.php' 100 edit_at_line 'CRM/Contact/BAO/GroupOrganization.php' 129 edit_at_line 'CRM/Contact/BAO/Individual.php' 402 edit_at_line 'CRM/Contact/BAO/Relationship.php' 377 edit_at_line 'CRM/Contact/Form/Search/Custom/ActivitySearch.php' 358 edit_at_line 'CRM/Contact/Import/Parser/Contact.php' 253 edit_at_line 'CRM/Contribute/BAO/Contribution.php' 2600 edit_at_line 'CRM/Contribute/BAO/Contribution.php' 3191 edit_at_line 'CRM/Contribute/BAO/Widget.php' 47 edit_at_line 'CRM/Contribute/Import/Parser/Contribution.php' 143 edit_at_line 'CRM/Core/BAO/Address.php' 406 edit_at_line 'CRM/Core/BAO/Address.php' 1207 edit_at_line 'CRM/Core/BAO/Block.php' 525 edit_at_line 'CRM/Core/BAO/CustomField.php' 1094 edit_at_line 'CRM/Core/BAO/Discount.php' 50 edit_at_line 'CRM/Core/BAO/Email.php' 120 edit_at_line 'CRM/Core/BAO/EntityTag.php' 108 edit_at_line 'CRM/Core/BAO/EntityTag.php' 406 edit_at_line 'CRM/Core/BAO/IM.php' 68 edit_at_line 'CRM/Core/BAO/Location.php' 219 edit_at_line 'CRM/Core/BAO/Mapping.php' 71 edit_at_line 'CRM/Core/BAO/Mapping.php' 202 edit_at_line 'CRM/Core/BAO/Note.php' 226 edit_at_line 'CRM/Core/BAO/OpenID.php' 82 edit_at_line 'CRM/Core/BAO/OptionValue.php' 234 edit_at_line 'CRM/Core/BAO/RecurringEntity.php' 791 edit_at_line 'CRM/Core/BAO/Setting.php' 1112 edit_at_line 'CRM/Core/BAO/Tag.php' 322 edit_at_line 'CRM/Core/BAO/Tag.php' 413 edit_at_line 'CRM/Core/BAO/UFField.php' 111 edit_at_line 'CRM/Core/BAO/UFGroup.php' 1379 edit_at_line 'CRM/Core/BAO/UFGroup.php' 1406 edit_at_line 'CRM/Core/BAO/UFGroup.php' 3119 edit_at_line 'CRM/Core/BAO/Website.php' 137 edit_at_line 'CRM/Core/Config.php' 670 edit_at_line 'CRM/Core/Form.php' 632 edit_at_line 'CRM/Core/Form.php' 1559 edit_at_line 'CRM/Core/IDS.php' 57 edit_at_line 'CRM/Core/IDS.php' 182 edit_at_line 'CRM/Core/IDS.php' 213 edit_at_line 'CRM/Core/InnoDBIndexer.php' 273 edit_at_line 'CRM/Core/Lock.php' 151 edit_at_line 'CRM/Core/Payment/BaseIPN.php' 87 edit_at_line 'CRM/Core/Payment/BaseIPN.php' 136 edit_at_line 'CRM/Core/Payment/BaseIPN.php' 186 edit_at_line 'CRM/Core/Payment/BaseIPN.php' 257 edit_at_line 'CRM/Core/Payment/PayPalImpl.php' 451 edit_at_line 'CRM/Core/Payment/PayPalProIPN.php' 166 edit_at_line 'CRM/Core/Payment/PayPalProIPN.php' 388 edit_at_line 'CRM/Core/Payment.php' 617 edit_at_line 'CRM/Core/PseudoConstant.php' 233 edit_at_line 'CRM/Core/PseudoConstant.php' 492 edit_at_line 'CRM/Core/Session.php' 571 edit_at_line 'CRM/Core/StateMachine.php' 394 edit_at_line 'CRM/Custom/Import/Parser/Api.php' 57 edit_at_line 'CRM/Event/BAO/Event.php' 1895 edit_at_line 'CRM/Event/BAO/Participant.php' 2197 edit_at_line 'CRM/Event/Form/ManageEvent/Registration.php' 670 edit_at_line 'CRM/Event/Form/ManageEvent/Registration.php' 691 edit_at_line 'CRM/Event/Form/ManageEvent/Registration.php' 726 edit_at_line 'CRM/Event/Import/Parser/Participant.php' 131 edit_at_line 'CRM/Financial/BAO/PaymentProcessor.php' 243 edit_at_line 'CRM/Member/BAO/Membership.php' 2050 edit_at_line 'CRM/Member/Import/Parser/Membership.php' 115 edit_at_line 'CRM/PCP/BAO/PCP.php' 794 edit_at_line 'CRM/PCP/BAO/PCP.php' 815 edit_at_line 'CRM/PCP/BAO/PCP.php' 867 edit_at_line 'CRM/PCP/BAO/PCP.php' 893 edit_at_line 'CRM/Price/BAO/PriceField.php' 631 edit_at_line 'CRM/Price/BAO/PriceFieldValue.php' 230 edit_at_line 'CRM/Price/BAO/PriceSet.php' 376 edit_at_line 'CRM/Price/BAO/PriceSet.php' 413 edit_at_line 'CRM/Upgrade/Snapshot/V4p2/Price/BAO/Field.php' 527 edit_at_line 'CRM/Upgrade/Snapshot/V4p2/Price/BAO/FieldValue.php' 198 edit_at_line 'CRM/Upgrade/Snapshot/V4p2/Price/BAO/FieldValue.php' 218 edit_at_line 'CRM/Upgrade/Snapshot/V4p2/Price/BAO/Set.php' 348 edit_at_line 'CRM/Utils/Array.php' 445 edit_at_line 'CRM/Utils/String.php' 317 edit_at_line 'CRM/Utils/String.php' 396 edit_at_line 'CRM/Utils/String.php' 416 edit_at_line 'CRM/Utils/Tree.php' 153 edit_at_line 'CRM/Utils/Weight.php' 202 edit_at_line 'CRM/Utils/Weight.php' 244 edit_at_line 'CRM/Utils/Weight.php' 267 edit_at_line 'CRM/Widget/Widget.php' 65 edit_at_line 'api/class.api.php' 158 edit_at_line 'api/v3/GroupContact.php' 160 edit_at_line 'api/v3/Profile.php' 697