Skip to content

Commit

Permalink
Typos, minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed May 18, 2024
1 parent 97c883e commit b96effe
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/GalettePaypal/Paypal.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
use Galette\Entity\ContributionsTypes;

/**
* Preferences for paypal
* Preferences for Paypal
*
* @author Johan Cwiklinski <johan@x-tnd.be>
*/
Expand Down Expand Up @@ -106,7 +106,7 @@ public function load(): void
Analog::ERROR
);
//consider plugin is not loaded when missing the main preferences
//(that includes paypal id)
//(that includes Paypal id)
$this->loaded = false;
}
}
Expand All @@ -125,7 +125,7 @@ private function loadAmounts(): void
$results = $this->zdb->selectAll(PAYPAL_PREFIX . self::TABLE);
$results = $results->toArray();

//check if all types currently exists in paypal table
//check if all types currently exists in Paypal table
if (count($results) != count($this->prices)) {
Analog::log(
'[' . get_class($this) . '] There are missing types in ' .
Expand All @@ -138,7 +138,7 @@ private function loadAmounts(): void
foreach ($this->prices as $k => $v) {
$_found = false;
if (count($results) > 0) {
//for each entry in types, we want to get the associated amount
//for each entry in types, we want one in the Paypal table
foreach ($results as $paypal) {
if ($paypal['id_type_cotis'] == $k) {
$_found = true;
Expand Down Expand Up @@ -216,7 +216,7 @@ public function store(): bool

Analog::log(
'[' . get_class($this) .
'] Paypal preferences were sucessfully stored',
'] Paypal preferences were successfully stored',
Analog::INFO
);

Expand Down Expand Up @@ -258,7 +258,7 @@ public function storeAmounts(): bool
}

Analog::log(
'[' . get_class($this) . '] Paypal amounts were sucessfully stored',
'[' . get_class($this) . '] Paypal amounts were successfully stored',
Analog::INFO
);
return true;
Expand All @@ -273,7 +273,7 @@ public function storeAmounts(): bool
}

/**
* Add missing types in paypal table
* Add missing types in Paypal table
*
* @param array<int, array<string, mixed>> $queries Array of items to insert
*
Expand Down Expand Up @@ -314,7 +314,7 @@ private function newEntries(array $queries): void
*
* @return string
*/
public function getId(): string
public function getId(): ?string
{
return $this->id;
}
Expand All @@ -331,7 +331,7 @@ public function getAmounts(Login $login): array
$prices = array();
foreach ($this->prices as $k => $v) {
if (!$this->isInactive($k)) {
if ($login->isLogged() || $v['extra'] == 0) {
if ($login->isLogged() || $v['extra'] == ContributionsTypes::DONATION_TYPE) {
$prices[$k] = $v;
}
}
Expand Down

0 comments on commit b96effe

Please sign in to comment.