@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | // This options allows you to override the currency shown for the null value |
59 | 59 | $resolver->setDefault('base_currency', null); |
60 | 60 | |
61 | - $resolver->setDefault('empty_message', function (Options $options) { |
|
61 | + $resolver->setDefault('empty_message', function(Options $options) { |
|
62 | 62 | //By default we use the global base currency: |
63 | 63 | $iso_code = $this->base_currency; |
64 | 64 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | throw new RuntimeException('The choice must be an instance of '.Currency::class); |
84 | 84 | } |
85 | 85 | |
86 | - if(!empty($choice->getIsoCode())) { |
|
86 | + if (!empty($choice->getIsoCode())) { |
|
87 | 87 | $symbol = Currencies::getSymbol($choice->getIsoCode()); |
88 | 88 | } else { |
89 | 89 | $symbol = null; |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | |
105 | 105 | protected function getChoiceContent(AbstractStructuralDBElement $choice, $key, $value, $options): string |
106 | 106 | { |
107 | - if(!$choice instanceof Currency) { |
|
107 | + if (!$choice instanceof Currency) { |
|
108 | 108 | throw new RuntimeException('$choice must be an instance of Currency!'); |
109 | 109 | } |
110 | 110 | |
@@ -121,10 +121,10 @@ discard block |
||
121 | 121 | $tmp = str_repeat('<span class="picker-level"></span>', $level); |
122 | 122 | |
123 | 123 | //Show currency symbol or ISO code and the name of the currency |
124 | - if(!empty($choice->getIsoCode())) { |
|
124 | + if (!empty($choice->getIsoCode())) { |
|
125 | 125 | $tmp .= Currencies::getSymbol($choice->getIsoCode()); |
126 | 126 | //Add currency name as badge |
127 | - $tmp .= sprintf('<span class="badge bg-primary ms-2 %s">%s</span>', $options['short'] ? 'picker-hs' : '' , htmlspecialchars($choice->getName())); |
|
127 | + $tmp .= sprintf('<span class="badge bg-primary ms-2 %s">%s</span>', $options['short'] ? 'picker-hs' : '', htmlspecialchars($choice->getName())); |
|
128 | 128 | } else { |
129 | 129 | $tmp .= htmlspecialchars($choice->getName()); |
130 | 130 | } |