Code cleanup

This commit is contained in:
James Cole
2024-12-22 08:43:12 +01:00
parent 5751f7e5a3
commit 565bd87959
574 changed files with 4600 additions and 4604 deletions

View File

@@ -144,7 +144,7 @@ trait AccountServiceTrait
$data[$field] = $data[$field]->toAtomString();
}
$factory->crud($account, $field, (string)$data[$field]);
$factory->crud($account, $field, (string) $data[$field]);
}
}
}
@@ -174,7 +174,7 @@ trait AccountServiceTrait
*/
public function validOBData(array $data): bool
{
$data['opening_balance'] = (string)($data['opening_balance'] ?? '');
$data['opening_balance'] = (string) ($data['opening_balance'] ?? '');
if ('' !== $data['opening_balance'] && 0 === bccomp($data['opening_balance'], '0')) {
$data['opening_balance'] = '';
}
@@ -201,7 +201,7 @@ trait AccountServiceTrait
if (is_array($language)) {
$language = 'en_US';
}
$language = (string)$language;
$language = (string) $language;
$sourceId = null;
$sourceName = null;
$destId = null;
@@ -434,7 +434,7 @@ trait AccountServiceTrait
if (is_array($language)) {
$language = 'en_US';
}
$language = (string)$language;
$language = (string) $language;
// set source and/or destination based on whether the amount is positive or negative.
// first, assume the amount is positive and go from there:
@@ -623,7 +623,7 @@ trait AccountServiceTrait
if (is_array($language)) {
$language = 'en_US';
}
$language = (string)$language;
$language = (string) $language;
$sourceId = null;
$sourceName = null;
$destId = null;