Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1b5f996

Browse filesBrowse files
committed
Fix CS
1 parent 44dd80f commit 1b5f996
Copy full SHA for 1b5f996

File tree

Expand file treeCollapse file tree

5 files changed

+10
-10
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+10
-10
lines changed

‎src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ private function round($number)
251251
{
252252
if (null !== $this->scale && null !== $this->roundingMode) {
253253
// shift number to maintain the correct scale during rounding
254-
$roundingCoef = pow(10, $this->scale);
254+
$roundingCoef = 10 ** $this->scale;
255255
// string representation to avoid rounding errors, similar to bcmul()
256256
$number = (string) ($number * $roundingCoef);
257257

‎src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,10 @@ public function testAddFormErrorIfPostMaxSizeExceeded($contentLength, $iniMax, $
338338
public function getPostMaxSizeFixtures()
339339
{
340340
return [
341-
[pow(1024, 3) + 1, '1G', true, ['{{ max }}' => '1G']],
342-
[pow(1024, 3), '1G', false],
343-
[pow(1024, 2) + 1, '1M', true, ['{{ max }}' => '1M']],
344-
[pow(1024, 2), '1M', false],
341+
[1024 ** 3 + 1, '1G', true, ['{{ max }}' => '1G']],
342+
[1024 ** 3, '1G', false],
343+
[1024 ** 2 + 1, '1M', true, ['{{ max }}' => '1M']],
344+
[1024 ** 2, '1M', false],
345345
[1024 + 1, '1K', true, ['{{ max }}' => '1K']],
346346
[1024, '1K', false],
347347
[null, '1K', false],

‎src/Symfony/Component/HttpClient/Tests/CachingHttpClientTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/Tests/CachingHttpClientTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function testRemovesXContentDigest()
8989
'test', [
9090
'response_headers' => [
9191
'X-Content-Digest' => 'some-hash',
92-
]
92+
],
9393
]));
9494
$headers = $response->getHeaders();
9595

@@ -100,7 +100,7 @@ private function runRequest(MockResponse $mockResponse): ResponseInterface
100100
{
101101
$mockClient = new MockHttpClient($mockResponse);
102102

103-
$store = new Store(sys_get_temp_dir() . '/sf_http_cache');
103+
$store = new Store(sys_get_temp_dir().'/sf_http_cache');
104104
$client = new CachingHttpClient($mockClient, $store);
105105

106106
$response = $client->request('GET', 'http://test');

‎src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ private function roundCurrency(float $value, string $currency): float
699699

700700
// Swiss rounding
701701
if (0 < $roundingIncrement && 0 < $fractionDigits) {
702-
$roundingFactor = $roundingIncrement / pow(10, $fractionDigits);
702+
$roundingFactor = $roundingIncrement / 10 ** $fractionDigits;
703703
$value = round($value / $roundingFactor) * $roundingFactor;
704704
}
705705

@@ -721,7 +721,7 @@ private function round($value, int $precision)
721721
if (isset(self::$phpRoundingMap[$roundingModeAttribute])) {
722722
$value = round($value, $precision, self::$phpRoundingMap[$roundingModeAttribute]);
723723
} elseif (isset(self::$customRoundingList[$roundingModeAttribute])) {
724-
$roundingCoef = pow(10, $precision);
724+
$roundingCoef = 10 ** $precision;
725725
$value *= $roundingCoef;
726726
$value = (float) (string) $value;
727727

‎src/Symfony/Component/Messenger/Retry/MultiplierRetryStrategy.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Retry/MultiplierRetryStrategy.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function getWaitingTime(Envelope $message): int
7474
{
7575
$retries = RedeliveryStamp::getRetryCountFromEnvelope($message);
7676

77-
$delay = $this->delayMilliseconds * pow($this->multiplier, $retries);
77+
$delay = $this->delayMilliseconds * $this->multiplier ** $retries;
7878

7979
if ($delay > $this->maxDelayMilliseconds && 0 !== $this->maxDelayMilliseconds) {
8080
return $this->maxDelayMilliseconds;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.