Passed
Push — master ( a28e81...e3800e )
by Jan
04:35
created
src/Services/AmountFormatter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function format($value, ?MeasurementUnit $unit = null, array $options = [])
55 55
     {
56
-        if (! is_numeric($value)) {
56
+        if (!is_numeric($value)) {
57 57
             throw new InvalidArgumentException('$value must be an numeric value!');
58 58
         }
59 59
         $value = (float) $value;
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         }
76 76
 
77 77
         //Otherwise just output it
78
-        if (! empty($options['unit'])) {
78
+        if (!empty($options['unit'])) {
79 79
             $format_string = '%.'.$options['decimals'].'f '.$options['unit'];
80 80
         } else { //Dont add space after number if no unit was specified
81 81
             $format_string = '%.'.$options['decimals'].'f';
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     protected function configureOptions(OptionsResolver $resolver): void
88 88
     {
89 89
         $resolver->setDefaults([
90
-            'show_prefix' => function (Options $options) {
90
+            'show_prefix' => function(Options $options) {
91 91
                 if (null !== $options['measurement_unit']) {
92 92
                     /** @var MeasurementUnit $unit */
93 93
                     $unit = $options['measurement_unit'];
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
                 return false;
99 99
             },
100
-            'is_integer' => function (Options $options) {
100
+            'is_integer' => function(Options $options) {
101 101
                 if (null !== $options['measurement_unit']) {
102 102
                     /** @var MeasurementUnit $unit */
103 103
                     $unit = $options['measurement_unit'];
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
                 return true;
109 109
             },
110
-            'unit' => function (Options $options) {
110
+            'unit' => function(Options $options) {
111 111
                 if (null !== $options['measurement_unit']) {
112 112
                     /** @var MeasurementUnit $unit */
113 113
                     $unit = $options['measurement_unit'];
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
         $resolver->setAllowedTypes('decimals', 'int');
127 127
 
128
-        $resolver->setNormalizer('decimals', function (Options $options, $value) {
128
+        $resolver->setNormalizer('decimals', function(Options $options, $value) {
129 129
             // If the unit is integer based, then dont show any decimals
130 130
             if ($options['is_integer']) {
131 131
                 return 0;
Please login to merge, or discard this patch.