Skip to content

Commit

Permalink
feat(phpcs): Enforce fully multiline arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
ragusa87 committed Dec 7, 2024
1 parent a172362 commit 6d68345
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
'visibility_required' => [
'elements' => ['property', 'method', 'const'],
],
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
],
'yoda_style' => false,
]);

Expand Down
4 changes: 2 additions & 2 deletions src/Controller/Kobo/Api/ImageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public function __construct(
protected ShelfRepository $shelfRepository,
protected LoggerInterface $logger,
protected DownloadHelper $downloadHelper,
protected SyncResponseFactory $syncResponseFactory)
{
protected SyncResponseFactory $syncResponseFactory,
) {
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Kobo/Proxy/KoboProxyLoggerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ class KoboProxyLoggerFactory
{
public function __construct(
protected KoboProxyConfiguration $configuration,
protected LoggerInterface $koboProxyLogger)
{
protected LoggerInterface $koboProxyLogger,
) {
}

public function create(string $accessToken): KoboProxyLogger
Expand Down
12 changes: 7 additions & 5 deletions src/Kobo/Proxy/KoboStoreProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,13 @@ private function _proxy(Request $request, string $hostname, array $config = []):

$client = $this->getClient($request);

$psrResponse = $client->send($psrRequest, [
'base_uri' => $hostname,
'http_errors' => false,
'connect_timeout' => 5,
] + $config
$psrResponse = $client->send(
$psrRequest,
[
'base_uri' => $hostname,
'http_errors' => false,
'connect_timeout' => 5,
] + $config
);

return $this->convertResponse($psrResponse, $config['stream'] ?? true);
Expand Down
6 changes: 4 additions & 2 deletions tests/Controller/Kobo/Api/V1/DownloadControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ public function testDownloadMissingBook(): void

$client = self::getClient();

$client?->request('GET',
sprintf('/kobo/%s/v1/download/%s.%s', KoboFixture::ACCESS_KEY, $book->getId(), MetadataResponseService::KEPUB_FORMAT));
$client?->request(
'GET',
sprintf('/kobo/%s/v1/download/%s.%s', KoboFixture::ACCESS_KEY, $book->getId(), MetadataResponseService::KEPUB_FORMAT)
);
self::assertResponseStatusCodeSame(403);
}

Expand Down

0 comments on commit 6d68345

Please sign in to comment.