Skip to content

Commit 896a840

Browse files
authored
Merge pull request #6 from eclipxe13/main
Improve code readability before release
2 parents b6d0ead + 6c0b472 commit 896a840

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/Validate/Common/BaseCurrency.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ private function validateNode(NodeInterface $node, Asserts $asserts, string $loc
4545
{
4646
$currencyExists = $node->attributes()->exists('Moneda');
4747
$currency = $node['Moneda'];
48-
$currencyExplanation = $currencyExists ? $currency ?: '(vacía)' : '(ninguna)';
48+
$currencyExplanation = $currencyExists ? ($currency ?: '(vacía)') : '(ninguna)';
49+
4950
$asserts->put(
5051
$this->getAssertCode(sprintf('-%03d', $count)),
5152
'La moneda solo se especifica en caso de que sea diferente a moneda nacional',

src/Validate/Common/BaseExchangeRate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ private function validateNode(NodeInterface $node, Asserts $asserts, string $loc
4545
{
4646
$currencyExists = $node->attributes()->exists('Moneda');
4747
$currency = $node['Moneda'];
48-
$currencyExplanation = $currencyExists ? $currency ?: '(vacía)' : '(ninguna)';
48+
$currencyExplanation = $currencyExists ? ($currency ?: '(vacía)') : '(ninguna)';
4949

5050
$exchangeRate = $node['TipCamb'];
5151
$asserts->put(

0 commit comments

Comments
 (0)