mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Code cleanup
This commit is contained in:
@@ -41,7 +41,7 @@ class Customer extends SpectreObject
|
||||
*/
|
||||
public function __construct(array $data)
|
||||
{
|
||||
$this->id = intval($data['id']);
|
||||
$this->id = (int)$data['id'];
|
||||
$this->identifier = $data['identifier'];
|
||||
$this->secret = $data['secret'];
|
||||
}
|
||||
|
@@ -84,7 +84,7 @@ class Transaction extends SpectreObject
|
||||
*/
|
||||
public function getAmount(): string
|
||||
{
|
||||
return strval($this->amount);
|
||||
return (string)$this->amount;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -124,7 +124,7 @@ class Transaction extends SpectreObject
|
||||
*/
|
||||
public function getHash(): string
|
||||
{
|
||||
$array = [
|
||||
$array = [
|
||||
'id' => $this->id,
|
||||
'mode' => $this->mode,
|
||||
'status' => $this->status,
|
||||
@@ -139,9 +139,8 @@ class Transaction extends SpectreObject
|
||||
'created_at' => $this->createdAt->toIso8601String(),
|
||||
'updated_at' => $this->updatedAt->toIso8601String(),
|
||||
];
|
||||
$hashed = hash('sha256', json_encode($array));
|
||||
|
||||
return $hashed;
|
||||
return hash('sha256', json_encode($array));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -136,9 +136,9 @@ class TransactionExtra extends SpectreObject
|
||||
'id' => $this->id,
|
||||
'record_number' => $this->recordNumber,
|
||||
'information' => $this->information,
|
||||
'time' => is_null($this->time) ? null : $this->time->toIso8601String(),
|
||||
'posting_date' => is_null($this->postingDate) ? null : $this->postingDate->toIso8601String(),
|
||||
'posting_time' => is_null($this->postingTime) ? null : $this->postingTime->toIso8601String(),
|
||||
'time' => null === $this->time ? null : $this->time->toIso8601String(),
|
||||
'posting_date' => null === $this->postingDate ? null : $this->postingDate->toIso8601String(),
|
||||
'posting_time' => null === $this->postingTime ? null : $this->postingTime->toIso8601String(),
|
||||
'account_number' => $this->accountNumber,
|
||||
'original_amount' => $this->originalAmount,
|
||||
'original_currency_code' => $this->originalCurrencyCode,
|
||||
|
Reference in New Issue
Block a user