Skip to content

Commit

Permalink
update rector and re-process
Browse files Browse the repository at this point in the history
  • Loading branch information
DAcodedBEAT committed Aug 9, 2024
1 parent 33e4fe6 commit cb06ab4
Show file tree
Hide file tree
Showing 33 changed files with 268 additions and 252 deletions.
2 changes: 1 addition & 1 deletion src/CartToGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
require 'Include/Header.php';

if (count($_SESSION['aPeopleCart']) > 0) {
?>
?>

<script src="skin/js/GroupRoles.js"></script>

Expand Down
2 changes: 1 addition & 1 deletion src/ChurchCRM/Reports/PDF_Directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/ChurchCRM/Service/SystemService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
2 changes: 1 addition & 1 deletion src/ChurchCRM/Service/UpgradeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class UpgradeService
{
public static function upgradeDatabaseVersion()
public static function upgradeDatabaseVersion(): bool
{
$logger = LoggerUtils::getAppLogger();
$db_version = SystemService::getDBVersion();
Expand Down
16 changes: 16 additions & 0 deletions src/ChurchCRM/Twig/GettextExtension.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace ChurchCRM\Twig;

use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;

class GettextExtension extends AbstractExtension
{
public function getFunctions(): array
{
return [
new TwigFunction('gettext', 'gettext'),
];
}
}
2 changes: 1 addition & 1 deletion src/ChurchCRM/dto/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private function sendSMS(): bool
return true;
}

private function sendProjector(): string|false
private function sendProjector(): string
{
$OLPAlert = new OpenLPNotification(
SystemConfig::getValue('sOLPURL'),
Expand Down
6 changes: 3 additions & 3 deletions src/ChurchCRM/dto/Photo.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public function getThumbnailBytes(): string
return $content;
}

public function getPhotoBytes(): string|false
public function getPhotoBytes()
{
$content = file_get_contents($this->photoURI);
MiscUtils::throwIfFailed($content);
Expand Down Expand Up @@ -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));
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/ChurchCRM/model/ChurchCRM/Family.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/ChurchCRM/utils/InputUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class InputUtils
{
private static string $AllowedHTMLTags = '<a><b><i><u><h1><h2><h3><h4><h5><h6><pre><address><img><table><td><tr><ol><li><ul><p><sub><sup><s><hr><span><blockquote><div><small><big><tt><code><kbd><samp><del><ins><cite><q>';

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);
Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/DonatedItemEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
<?php if ($bMultibuy) {
echo gettext('Multiple');
} else {
?>
?>
<select name="Buyer" class="form-control">
<option value="0" selected><?= gettext('Unassigned') ?></option>
<?php
Expand All @@ -264,7 +264,7 @@
echo '>' . $pn_Num . ': ' . $buyerFirstName . ' ' . $buyerLastName;
}
}
?>
?>

</select>
</div>
Expand Down
Loading

0 comments on commit cb06ab4

Please sign in to comment.