Skip to content

Commit 0a312c1

Browse files
committed
Removed wrong CS fix
1 parent e0f653e commit 0a312c1

8 files changed

Lines changed: 23 additions & 27 deletions

File tree

src/BigBlueButton.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ class BigBlueButton
9797
public function __construct(?string $baseUrl = null, ?string $secret = null, ?TransportInterface $transport = null, protected HashingAlgorithm $hashingAlgorithm = HashingAlgorithm::SHA_1)
9898
{
9999
if (null === $baseUrl) {
100-
@trigger_error(sprintf('Constructing "%s" without passing a server base URL is deprecated and will throw an exception 6.0.', self::class), \E_USER_DEPRECATED);
100+
@trigger_error(\sprintf('Constructing "%s" without passing a server base URL is deprecated and will throw an exception 6.0.', self::class), \E_USER_DEPRECATED);
101101
}
102102

103103
if (null === $secret) {
104-
@trigger_error(sprintf('Constructing "%s" without passing a secret is deprecated and will throw an exception 6.0.', self::class), \E_USER_DEPRECATED);
104+
@trigger_error(\sprintf('Constructing "%s" without passing a secret is deprecated and will throw an exception 6.0.', self::class), \E_USER_DEPRECATED);
105105
}
106106

107107
if (getenv('BBB_SECURITY_SALT') !== false || getenv('BBB_SECRET') !== false) {
@@ -117,7 +117,7 @@ public function __construct(?string $baseUrl = null, ?string $secret = null, ?Tr
117117

118118
if (false === $securitySecret) {
119119
// @codeCoverageIgnoreStart
120-
@trigger_error(sprintf('Constructing "%s" without passing a secret is deprecated since 6.0 and will throw an exception in 7.0.', self::class), \E_USER_DEPRECATED);
120+
@trigger_error(\sprintf('Constructing "%s" without passing a secret is deprecated since 6.0 and will throw an exception in 7.0.', self::class), \E_USER_DEPRECATED);
121121
$this->securitySecret = ''; // previous behaviour
122122
// @codeCoverageIgnoreEnd
123123
} else {
@@ -128,7 +128,7 @@ public function __construct(?string $baseUrl = null, ?string $secret = null, ?Tr
128128

129129
if (false === $bbbServerBaseUrl) {
130130
// @codeCoverageIgnoreStart
131-
@trigger_error(sprintf('Constructing "%s" without passing a server base URL is deprecated since 6.0 and will throw an exception in 7.0.', self::class), \E_USER_DEPRECATED);
131+
@trigger_error(\sprintf('Constructing "%s" without passing a server base URL is deprecated since 6.0 and will throw an exception in 7.0.', self::class), \E_USER_DEPRECATED);
132132
$this->bbbServerBaseUrl = ''; // previous behaviour
133133
// @codeCoverageIgnoreEnd
134134
} else {

src/Http/Transport/Bridge/PsrHttpClient/PsrHttpClientTransport.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
// @codeCoverageIgnoreStart
3636
if (!interface_exists(ClientInterface::class)) {
37-
throw new \LogicException(sprintf(
37+
throw new \LogicException(\sprintf(
3838
'The "%s" interface was not found. '.
3939
'You cannot use "%s" without it.'.
4040
'Try running "composer require" for a package which provides psr/http-client-implementation.',
@@ -44,7 +44,7 @@
4444
}
4545

4646
if (!interface_exists(RequestFactoryInterface::class)) {
47-
throw new \LogicException(sprintf(
47+
throw new \LogicException(\sprintf(
4848
'The "%s" interface was not found. '.
4949
'You cannot use "%s" without it.'.
5050
'Try running "composer require" for a package which provides psr/http-factory-implementation.',
@@ -54,7 +54,7 @@
5454
}
5555

5656
if (!interface_exists(StreamFactoryInterface::class)) {
57-
throw new \LogicException(sprintf(
57+
throw new \LogicException(\sprintf(
5858
'The "%s" interface was not found. '.
5959
'You cannot use "%s" without it.'.
6060
'Try running "composer require" for a package which provides psr/http-factory-implementation.',
@@ -93,7 +93,7 @@ public function request(TransportRequest $request): TransportResponse
9393
try {
9494
$psrResponse = $this->httpClient->sendRequest($psrRequest);
9595
} catch (ClientExceptionInterface $e) {
96-
throw new RuntimeException(sprintf('HTTP request failed: %s', $e->getMessage()), 0, $e);
96+
throw new RuntimeException(\sprintf('HTTP request failed: %s', $e->getMessage()), 0, $e);
9797
}
9898

9999
if ($psrResponse->getStatusCode() < 200 || $psrResponse->getStatusCode() >= 300) {

src/Http/Transport/Bridge/SymfonyHttpClient/SymfonyHttpClientTransport.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
// @codeCoverageIgnoreStart
4040
if (!interface_exists(HttpClientInterface::class)) {
41-
throw new \LogicException(sprintf(
41+
throw new \LogicException(\sprintf(
4242
'The "%s" interface was not found. '.
4343
'You cannot use "%s" without it.'.
4444
'Try running "composer require" for a package which provides symfony/http-client-implementation.',
@@ -71,7 +71,7 @@ public static function create(array $defaultHeaders = [], array $defaultOptions
7171
{
7272
// @codeCoverageIgnoreStart
7373
if (!class_exists(HttpClient::class)) {
74-
throw new \LogicException(sprintf(
74+
throw new \LogicException(\sprintf(
7575
'Cannot create an instance of "%s" when Symfony HttpClient is not installed. '.
7676
'Either instantiate the class by yourself and pass a proper implementation or '.
7777
'try to run "composer require symfony/http-client".',
@@ -113,7 +113,7 @@ public function request(TransportRequest $request): TransportResponse
113113

114114
return new TransportResponse($symfonyResponse->getContent(), self::extractJsessionCookie($symfonyResponse));
115115
} catch (TransportExceptionInterface $e) {
116-
throw new RuntimeException(sprintf('HTTP request failed: %s', $e->getMessage()), 0, $e);
116+
throw new RuntimeException(\sprintf('HTTP request failed: %s', $e->getMessage()), 0, $e);
117117
} catch (ClientExceptionInterface|RedirectionExceptionInterface|ServerExceptionInterface $e) {
118118
throw new NetworkException('Bad response.', $e->getCode(), $e);
119119
}

src/Http/Transport/CurlTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ private static function getHeadersAndContentFromCurlHandle(\CurlHandle $curlHand
220220
$splitHeader = explode(': ', $line, 2);
221221
// @codeCoverageIgnoreStart
222222
if (!isset($splitHeader[0], $splitHeader[1])) {
223-
throw new \InvalidArgumentException(sprintf('Header value "%s" is invalid. Expected format is "Header-Name: value".', $line));
223+
throw new \InvalidArgumentException(\sprintf('Header value "%s" is invalid. Expected format is "Header-Name: value".', $line));
224224
}
225225
// @codeCoverageIgnoreEnd
226226

src/Http/Transport/Header.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ public static function mergeCurlHeaders(array ...$headers): array
4343
foreach ($headers as $headerSet) {
4444
foreach ($headerSet as $header) {
4545
if (!\is_string($header)) {
46-
throw new \InvalidArgumentException(sprintf(
46+
throw new \InvalidArgumentException(\sprintf(
4747
'Non-string header with type "%s" passed.',
4848
get_debug_type($header)
4949
));
5050
}
5151

5252
$splitHeader = explode(': ', $header, 2);
5353
if (!isset($splitHeader[0], $splitHeader[1])) {
54-
throw new \InvalidArgumentException(sprintf('Header value "%s" is invalid. Expected format is "Header-Name: value".', $header));
54+
throw new \InvalidArgumentException(\sprintf('Header value "%s" is invalid. Expected format is "Header-Name: value".', $header));
5555
}
5656

5757
// Enforce lower case for header names to avoid duplicates in mixed case. The case of header names should
@@ -62,7 +62,7 @@ public static function mergeCurlHeaders(array ...$headers): array
6262

6363
$result = [];
6464
foreach ($mergedHeaders as $header => $value) {
65-
$result[] = sprintf('%s: %s', $header, $value);
65+
$result[] = \sprintf('%s: %s', $header, $value);
6666
}
6767

6868
return $result;

tests/functional/AbstractBigBlueButtonFunctionalTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public function testJoinMeeting(): void
197197
$params = $this->generateJoinMeetingParams();
198198
$joinMeetingParams = new JoinMeetingParameters($result->getMeetingId(), $params['fullName'], $params['role']);
199199
$joinMeetingParams->setRedirect(false);
200-
$joinMeetingParams->setCreateTime((int) sprintf('%.0f', $creationTime));
200+
$joinMeetingParams->setCreateTime((int) \sprintf('%.0f', $creationTime));
201201

202202
$joinMeeting = $this->bbb->joinMeeting($joinMeetingParams);
203203
$this->assertEquals('SUCCESS', $joinMeeting->getReturnCode(), 'Join meeting');

tests/unit/Http/Transport/HeaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function provideBadlyFormattedHeaders(): iterable
6161
public function testMergeCurlHeadersWithBadHeaders(string $badHeader): void
6262
{
6363
$this->expectException(\InvalidArgumentException::class);
64-
$this->expectExceptionMessage(sprintf('Header value "%s" is invalid. Expected format is "Header-Name: value".', $badHeader));
64+
$this->expectExceptionMessage(\sprintf('Header value "%s" is invalid. Expected format is "Header-Name: value".', $badHeader));
6565

6666
Header::mergeCurlHeaders([$badHeader]);
6767
}
@@ -82,7 +82,7 @@ public function provideNonStringHeaders(): iterable
8282
public function testMergeCurlHeadersWithNonStringHeaders(mixed $badHeader): void
8383
{
8484
$this->expectException(\InvalidArgumentException::class);
85-
$this->expectExceptionMessage(sprintf(
85+
$this->expectExceptionMessage(\sprintf(
8686
'Non-string header with type "%s" passed.',
8787
get_debug_type($badHeader)
8888
));

tools/.phpstan/composer.lock

Lines changed: 5 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)