@@ -151,12 +151,12 @@ |
||
151 | 151 | private function makeMappedCharge(ChargeInterface $charge, ActionInterface $action): ChargeInterface |
152 | 152 | { |
153 | 153 | $coefficient = $this->getEffectiveCoefficient($action); |
154 | - $quantityUnderCap = $charge->getUsage()->multiply((string)$coefficient); |
|
154 | + $quantityUnderCap = $charge->getUsage()->multiply((string) $coefficient); |
|
155 | 155 | $chargeQuery = new ChargeDerivativeQuery(); |
156 | 156 | $chargeQuery->changeUsage( |
157 | - $this->getCapInHours()->multiply((string)$quantityUnderCap->getQuantity()) |
|
157 | + $this->getCapInHours()->multiply((string) $quantityUnderCap->getQuantity()) |
|
158 | 158 | ); |
159 | - $chargeQuery->changeSum($charge->getSum()->multiply((string)$coefficient)); |
|
159 | + $chargeQuery->changeSum($charge->getSum()->multiply((string) $coefficient)); |
|
160 | 160 | |
161 | 161 | return $this->chargeDerivative->__invoke($charge, $chargeQuery); |
162 | 162 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | $multiplier = self::calculateMultiplierToInteger($amount); |
54 | 54 | return new self( |
55 | - $parser->parse((string)($amount * $multiplier), $currency), |
|
55 | + $parser->parse((string) ($amount * $multiplier), $currency), |
|
56 | 56 | $multiplier |
57 | 57 | ); |
58 | 58 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | [$integer, $fraction] = explode('.', $amount, 2); |
90 | - return (int)('1' . implode(array_fill(0, strlen($fraction), 0))); |
|
90 | + return (int) ('1' . implode(array_fill(0, strlen($fraction), 0))); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |
@@ -128,7 +128,7 @@ |
||
128 | 128 | public function normalize(string $formula): ?string |
129 | 129 | { |
130 | 130 | $lines = explode(self::FORMULAS_SEPARATOR, $formula); |
131 | - $normalized = array_map(function ($value) { |
|
131 | + $normalized = array_map(function($value) { |
|
132 | 132 | $value = trim($value); |
133 | 133 | if ('' === $value) { |
134 | 134 | return null; |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | { |
44 | 44 | $res = []; |
45 | 45 | foreach ($data as $key => $value) { |
46 | - $res[$key] = $value*100; |
|
46 | + $res[$key] = $value * 100; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | return $res; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | [$amount, $currency] = explode(' ', $str); |
55 | 55 | |
56 | 56 | return [ |
57 | - 'amount' => $amount*100, |
|
57 | + 'amount' => $amount * 100, |
|
58 | 58 | 'currency' => $currency, |
59 | 59 | ]; |
60 | 60 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | /** |
32 | 32 | * @var null - any type can be used as ID or type name |
33 | 33 | */ |
34 | - const null ANY = null; |
|
34 | + const null ANY = null; |
|
35 | 35 | |
36 | 36 | const float NONE = INF; |
37 | 37 |
@@ -12,6 +12,6 @@ |
||
12 | 12 | |
13 | 13 | public static function isDeleted(TargetInterface $target): bool |
14 | 14 | { |
15 | - return self::tryFrom((string)$target->getState()) === self::DELETED; |
|
15 | + return self::tryFrom((string) $target->getState()) === self::DELETED; |
|
16 | 16 | } |
17 | 17 | } |