Skip to content

Commit 5c997bb

Browse files
committed
bug #8 fix coding standards (azjezz)
This PR was squashed before being merged into the 0.1-dev branch. Discussion ---------- fix coding standards Commits ------- 22148bf fix coding standards
2 parents cf0bf09 + 22148bf commit 5c997bb

27 files changed

+73
-68
lines changed

.github/workflows/unit-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ jobs:
2121
dependencies:
2222
- "lowest"
2323
- "highest"
24-
include:
25-
- { symfony-version: "4.4.*", php-version: "7.1", dependencies: "lowest" }
26-
- { symfony-version: "4.4.*", php-version: "7.1", dependencies: "highest" }
2724

2825
steps:
2926
- name: "checkout"

.php_cs.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ return PhpCsFixer\Config::create()
2929
],
3030
'list_syntax' => ['syntax' => 'short'],
3131
'no_null_property_initialization' => true,
32-
'no_superfluous_phpdoc_tags' => true,
32+
'phpdoc_to_comment' => false,
3333
'ordered_imports' => [
3434
'imports_order' => [
3535
OrderedImportsFixer::IMPORT_TYPE_CONST,

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=7.1",
19+
"php": ">=7.2",
2020
"doctrine/doctrine-bundle": "^2.0",
2121
"doctrine/orm": "^2.7",
2222
"league/oauth2-server": "^8.0",
2323
"psr/http-factory": "^1.0",
24-
"sensio/framework-extra-bundle": "^5.5",
24+
"sensio/framework-extra-bundle": "^5.6",
2525
"symfony/framework-bundle": "^4.4|^5.0",
2626
"symfony/psr-http-message-bridge": "^2.0",
2727
"symfony/security-bundle": "^4.4|^5.0"

src/Command/UpdateClientCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private function updateClientFromInput(Client $client, InputInterface $input): C
102102
return $client
103103
->setRedirectUris(...array_map(static function (string $redirectUri): RedirectUri {
104104
return new RedirectUri($redirectUri);
105-
}, $redirectUriStrings))
105+
}, $redirectUriStrings))
106106
->setGrants(...array_map(static function (string $grant): Grant {
107107
return new Grant($grant);
108108
}, $grantStrings))

src/DBAL/Type/Grant.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function getName(): string
3131
*/
3232
protected function convertDatabaseValues(array $values): array
3333
{
34-
return array_map(static function(string $value): GrantModel {
34+
return array_map(static function (string $value): GrantModel {
3535
return new GrantModel($value);
3636
}, $values);
3737
}

src/DBAL/Type/ImplodedArray.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ abstract class ImplodedArray extends TextType
2020
/**
2121
* {@inheritdoc}
2222
*/
23-
public function convertToDatabaseValue($value, AbstractPlatform $platform)
23+
public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
2424
{
2525
if (!\is_array($value)) {
2626
throw new \LogicException('This type can only be used in combination with arrays.');

src/DBAL/Type/RedirectUri.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function getName(): string
3131
*/
3232
protected function convertDatabaseValues(array $values): array
3333
{
34-
return array_map(static function(string $value): RedirectUriModel {
34+
return array_map(static function (string $value): RedirectUriModel {
3535
return new RedirectUriModel($value);
3636
}, $values);
3737
}

src/DBAL/Type/Scope.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function getName(): string
3131
*/
3232
protected function convertDatabaseValues(array $values): array
3333
{
34-
return array_map(static function(string $value): ScopeModel {
34+
return array_map(static function (string $value): ScopeModel {
3535
return new ScopeModel($value);
3636
}, $values);
3737
}

src/Event/AuthorizationRequestResolveEvent.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ public function hasResponse(): bool
7575
return $this->response instanceof ResponseInterface;
7676
}
7777

78+
/**
79+
* @psalm-mutation-free
80+
*/
7881
public function getResponse(): ?ResponseInterface
7982
{
8083
return $this->response;
@@ -93,11 +96,17 @@ public function getGrantTypeId(): string
9396
return $this->authorizationRequest->getGrantTypeId();
9497
}
9598

99+
/**
100+
* @psalm-mutation-free
101+
*/
96102
public function getClient(): Client
97103
{
98104
return $this->client;
99105
}
100106

107+
/**
108+
* @psalm-mutation-free
109+
*/
101110
public function getUser(): ?UserInterface
102111
{
103112
return $this->user;

src/Event/AuthorizationRequestResolveEventFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(ScopeConverterInterface $scopeConverter, ClientManag
2828

2929
public function fromAuthorizationRequest(AuthorizationRequest $authorizationRequest): AuthorizationRequestResolveEvent
3030
{
31-
$scopes = $this->scopeConverter->toDomainArray(\array_values($authorizationRequest->getScopes()));
31+
$scopes = $this->scopeConverter->toDomainArray(array_values($authorizationRequest->getScopes()));
3232

3333
$client = $this->clientManager->find($authorizationRequest->getClient()->getIdentifier());
3434

0 commit comments

Comments
 (0)