From cb06ab439e854b09751574d0410a9447e1de9885 Mon Sep 17 00:00:00 2001 From: Arun Philip Date: Thu, 8 Aug 2024 01:27:46 -0400 Subject: [PATCH] update rector and re-process --- src/CartToGroup.php | 2 +- src/ChurchCRM/Reports/PDF_Directory.php | 2 +- src/ChurchCRM/Service/SystemService.php | 2 +- src/ChurchCRM/Service/UpgradeService.php | 2 +- src/ChurchCRM/Twig/GettextExtension.php | 16 ++++ src/ChurchCRM/dto/Notification.php | 2 +- src/ChurchCRM/dto/Photo.php | 6 +- src/ChurchCRM/model/ChurchCRM/Family.php | 2 +- src/ChurchCRM/utils/InputUtils.php | 4 +- src/DonatedItemEditor.php | 4 +- src/FamilyEditor.php | 108 +++++++++++------------ src/FundRaiserEditor.php | 8 +- src/GroupList.php | 2 +- src/GroupPropsEditor.php | 10 +-- src/GroupPropsFormEditor.php | 14 +-- src/GroupReports.php | 2 +- src/GroupView.php | 54 ++++++------ src/Include/Footer-Short.php | 4 +- src/Include/Functions.php | 14 +-- src/PaddleNumEditor.php | 8 +- src/PaddleNumList.php | 8 +- src/PeopleDashboard.php | 38 ++++---- src/PersonCustomFieldsEditor.php | 12 +-- src/PledgeEditor.php | 72 +++++++-------- src/PrintView.php | 22 ++--- src/QuerySQL.php | 4 +- src/Reports/AdvancedDeposit.php | 2 +- src/SelectDelete.php | 50 +++++------ src/VolunteerOpportunityEditor.php | 8 +- src/api/routes/people/people-persons.php | 2 +- src/composer.lock | 32 +++---- src/v2/routes/calendar.php | 2 +- src/v2/templates/people/family-list.php | 2 +- 33 files changed, 268 insertions(+), 252 deletions(-) create mode 100644 src/ChurchCRM/Twig/GettextExtension.php diff --git a/src/CartToGroup.php b/src/CartToGroup.php index 5d47299fac..e732bcf948 100644 --- a/src/CartToGroup.php +++ b/src/CartToGroup.php @@ -40,7 +40,7 @@ require 'Include/Header.php'; if (count($_SESSION['aPeopleCart']) > 0) { -?> + ?> diff --git a/src/ChurchCRM/Reports/PDF_Directory.php b/src/ChurchCRM/Reports/PDF_Directory.php index 38bb534a7d..a0bfec38c3 100644 --- a/src/ChurchCRM/Reports/PDF_Directory.php +++ b/src/ChurchCRM/Reports/PDF_Directory.php @@ -345,7 +345,7 @@ public function sGetFamilyString($aRow): string // This function formats the string for the head of household. // NOTE: This is used for the Head AND Spouse (called twice) - public function sGetHeadString($rsCustomFields, $aHead) + public function sGetHeadString($rsCustomFields, $aHead): string { global $bDirBirthday; global $bDirPersonalPhone; diff --git a/src/ChurchCRM/Service/SystemService.php b/src/ChurchCRM/Service/SystemService.php index 727130b246..479792db2a 100644 --- a/src/ChurchCRM/Service/SystemService.php +++ b/src/ChurchCRM/Service/SystemService.php @@ -34,7 +34,7 @@ public static function getInstalledVersion() return $composerJson['version']; } - public static function getCopyrightDate() + public static function getCopyrightDate(): string { return (new \DateTime())->format('Y'); } diff --git a/src/ChurchCRM/Service/UpgradeService.php b/src/ChurchCRM/Service/UpgradeService.php index 8369f1991b..258b4d3ab9 100644 --- a/src/ChurchCRM/Service/UpgradeService.php +++ b/src/ChurchCRM/Service/UpgradeService.php @@ -18,7 +18,7 @@ class UpgradeService { - public static function upgradeDatabaseVersion() + public static function upgradeDatabaseVersion(): bool { $logger = LoggerUtils::getAppLogger(); $db_version = SystemService::getDBVersion(); diff --git a/src/ChurchCRM/Twig/GettextExtension.php b/src/ChurchCRM/Twig/GettextExtension.php new file mode 100644 index 0000000000..e3de833888 --- /dev/null +++ b/src/ChurchCRM/Twig/GettextExtension.php @@ -0,0 +1,16 @@ +photoURI); MiscUtils::throwIfFailed($content); @@ -266,7 +266,7 @@ private function loadFromGravatar($email, string $baseName): string throw new \Exception('Gravatar not found'); } - private function loadFromGoogle($email, string $baseName): string|false + private function loadFromGoogle($email, string $baseName) { $url = 'http://picasaweb.google.com/data/entry/api/user/'; $url .= strtolower(trim($email)); @@ -291,7 +291,7 @@ private function loadFromGoogle($email, string $baseName): string|false return false; } - private function getRandomColor(\GdImage $image): int|false + private function getRandomColor(\GdImage $image) { $red = random_int(0, 150); $green = random_int(0, 150); diff --git a/src/ChurchCRM/model/ChurchCRM/Family.php b/src/ChurchCRM/model/ChurchCRM/Family.php index 3d46bd8f45..048d1f5236 100644 --- a/src/ChurchCRM/model/ChurchCRM/Family.php +++ b/src/ChurchCRM/model/ChurchCRM/Family.php @@ -275,7 +275,7 @@ public function verify(): void $this->createTimeLineNote('verify'); } - public function getFamilyString($booleanIncludeHOH = true) + public function getFamilyString(bool $booleanIncludeHOH = true): string { $HoH = []; if ($booleanIncludeHOH) { diff --git a/src/ChurchCRM/utils/InputUtils.php b/src/ChurchCRM/utils/InputUtils.php index ef3c65cab5..1e1dc082e7 100644 --- a/src/ChurchCRM/utils/InputUtils.php +++ b/src/ChurchCRM/utils/InputUtils.php @@ -8,7 +8,7 @@ class InputUtils { private static string $AllowedHTMLTags = '


    • '; - public static function legacyFilterInputArr(array $arr, $key, $type = 'string', $size = 1): string|int|float + public static function legacyFilterInputArr(array $arr, $key, $type = 'string', $size = 1) { if (array_key_exists($key, $arr)) { return InputUtils::legacyFilterInput($arr[$key], $type, $size); @@ -89,7 +89,7 @@ public static function filterDate($sInput): string // Sanitizes user input as a security measure // Optionally, a filtering type and size may be specified. By default, strip any tags from a string. // Note that a database connection must already be established for the mysqli_real_escape_string function to work. - public static function legacyFilterInput($sInput, $type = 'string', $size = 1): string|int|float + public static function legacyFilterInput($sInput, $type = 'string', $size = 1) { global $cnInfoCentral; if (strlen($sInput) > 0) { diff --git a/src/DonatedItemEditor.php b/src/DonatedItemEditor.php index 9d153f1c9f..cd0641fd34 100644 --- a/src/DonatedItemEditor.php +++ b/src/DonatedItemEditor.php @@ -250,7 +250,7 @@ + ?>
      diff --git a/src/FamilyEditor.php b/src/FamilyEditor.php index d4fef7f682..ea98a63122 100644 --- a/src/FamilyEditor.php +++ b/src/FamilyEditor.php @@ -560,8 +560,8 @@ + ?>

      @@ -593,9 +593,9 @@

      maxlength="10" size="8">
      @@ -606,7 +606,7 @@
      + ?>
      @@ -617,7 +617,7 @@
      - @@ -641,7 +641,7 @@ "' data-mask> > + } ?>>
      @@ -680,9 +680,9 @@
      > + } ?>>
      - @@ -704,11 +704,11 @@ ">
      + ?>
      - @@ -726,15 +726,15 @@ + } ?>" size="30" maxlength="50"> - 0) { - ?> + ?>

      @@ -747,7 +747,7 @@ while ($rowCustomField = mysqli_fetch_array($rsCustomFields, MYSQLI_BOTH)) { extract($rowCustomField); if (AuthenticationManager::getCurrentUser()->isEnabledSecurity($aSecurityType[$fam_custom_FieldSec])) { - ?> + ?>
      @@ -765,7 +765,7 @@
      + } ?>

      @@ -776,7 +776,7 @@
      0) { - ?> + ?>
@@ -849,7 +849,7 @@ @@ -926,8 +926,8 @@
- + @@ -936,7 +936,7 @@
'; - } + } echo '
@@ -813,14 +813,14 @@ } for ($iCount = 1; $iCount <= $iFamilyMemberRows; $iCount++) { - ?> + ?>
+ } ?>
@@ -835,13 +835,13 @@ @@ -915,8 +915,8 @@ } ?> - > +
'; echo ''; - } + } echo ''; echo ''; echo ' '; - if (AuthenticationManager::getCurrentUser()->isAddRecordsEnabled()) { - echo ' '; - } + if (AuthenticationManager::getCurrentUser()->isAddRecordsEnabled()) { + echo ' '; + } echo ' 0) { - echo " onclick=\"javascript:document.location='v2/family/$iFamilyID';\">"; - } else { - echo " onclick=\"javascript:document.location='" . SystemURLs::getRootPath() . "/v2/family';\">"; - } + if ($iFamilyID > 0) { + echo " onclick=\"javascript:document.location='v2/family/$iFamilyID';\">"; + } else { + echo " onclick=\"javascript:document.location='" . SystemURLs::getRootPath() . "/v2/family';\">"; + } echo ''; - ?> + ?> " name="FundRaiserSubmit"> + } else { + echo 'v2/dashboard'; + } ?>';"> 0) { echo '\n"; @@ -250,7 +250,7 @@
Delete - diff --git a/src/GroupList.php b/src/GroupList.php index 47c4b32166..e988a11395 100644 --- a/src/GroupList.php +++ b/src/GroupList.php @@ -34,7 +34,7 @@ isManageGroupsEnabled()) { -?> + ?>
diff --git a/src/GroupPropsEditor.php b/src/GroupPropsEditor.php index a52dc6e898..1ed635eefe 100644 --- a/src/GroupPropsEditor.php +++ b/src/GroupPropsEditor.php @@ -102,15 +102,15 @@ require 'Include/Header.php'; if (mysqli_num_rows($rsPropList) === 0) { -?> + ?>


- + ?>
@@ -145,7 +145,7 @@ - @@ -159,6 +159,6 @@
- + ?>

- + ?>
@@ -285,7 +285,7 @@ + ?>

@@ -349,10 +349,10 @@ > + } ?>> - @@ -369,7 +369,7 @@ - diff --git a/src/GroupReports.php b/src/GroupReports.php index ed9dd4d9c7..69535b183c 100644 --- a/src/GroupReports.php +++ b/src/GroupReports.php @@ -141,6 +141,6 @@ -getId() . '">' . gettext('Edit this Group') . ''; echo ''; ?> - getHasSpecialProps()) { echo '' . gettext('Edit Group-Specific Properties Form') . ''; } @@ -115,7 +115,7 @@ if (AuthenticationManager::getCurrentUser()->isEmailEnabled()) { // Does user have permission to email groups // Display link - ?> + ?>
-