Skip to content

Commit 37244b6

Browse files
committed
CS
1 parent 70aa117 commit 37244b6

File tree

6 files changed

+28
-58
lines changed

6 files changed

+28
-58
lines changed

.php_cs

Lines changed: 20 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -6,70 +6,39 @@ use PhpCsFixer\Config;
66
use PhpCsFixer\Finder;
77

88
$rules = [
9-
'@PSR2' => true,
10-
'@Symfony' => true,
11-
'@Symfony:risky' => true,
9+
'@PhpCsFixer' => true,
10+
'@PhpCsFixer:risky' => true,
1211
'@PHP71Migration' => true,
1312
'@PHP71Migration:risky' => true,
1413
'@PHPUnit75Migration:risky' => true,
15-
'array_syntax' => ['syntax' => 'short'],
16-
'combine_consecutive_unsets' => true,
17-
'comment_to_phpdoc' => true,
18-
'compact_nullable_typehint' => true,
19-
'escape_implicit_backslashes' => true,
20-
'explicit_indirect_variable' => true,
21-
'explicit_string_variable' => true,
22-
'final_internal_class' => true,
23-
'fully_qualified_strict_types' => true,
2414
'header_comment' => ['header' => ''],
25-
'heredoc_to_nowdoc' => true,
2615
'list_syntax' => ['syntax' => 'short'],
27-
'logical_operators' => true,
28-
'multiline_comment_opening_closing' => true,
29-
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
30-
'no_alternative_syntax' => true,
31-
'no_binary_string' => true,
32-
'no_null_property_initialization' => true,
33-
'no_short_echo_tag' => true,
34-
'no_unreachable_default_argument_value' => true,
35-
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
36-
'no_unset_on_property' => true,
37-
'no_useless_else' => true,
38-
'no_useless_return' => true,
39-
'ordered_class_elements' => true,
40-
'ordered_imports' => true,
41-
'php_unit_method_casing' => true,
42-
'php_unit_set_up_tear_down_visibility' => true,
16+
'nullable_type_declaration_for_default_null_value' => true,
17+
'php_unit_strict' => false,
4318
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
44-
'phpdoc_add_missing_param_annotation' => true,
45-
'phpdoc_inline_tag' => false,
46-
'phpdoc_order' => true,
19+
'php_unit_test_class_requires_covers' => false,
20+
'phpdoc_line_span' => ['const' => 'single', 'method' => 'multi', 'property' => 'single'],
4721
'phpdoc_to_comment' => false,
48-
'phpdoc_trim_consecutive_blank_line_separation' => true,
49-
'phpdoc_var_annotation_correct_order' => true,
50-
'simple_to_complex_string_variable' => true,
51-
'static_lambda' => true,
52-
'strict_comparison' => true,
53-
'strict_param' => true,
54-
'string_line_ending' => true,
22+
'self_static_accessor' => true,
5523
];
5624

5725
return Config::create()
5826
->setUsingCache(true)
5927
->setCacheFile(__DIR__.'/var/php-cs-fixer.cache')
6028
->setRules($rules)
6129
->setRiskyAllowed(true)
62-
->setFinder(Finder::create()
63-
->in([
64-
__DIR__.'/config',
65-
__DIR__.'/public',
66-
__DIR__.'/src',
67-
__DIR__.'/tests',
68-
])
69-
->append([
70-
__FILE__,
71-
__DIR__.'/bin/console',
72-
__DIR__.'/bin/phpunit',
73-
])
30+
->setFinder(
31+
Finder::create()
32+
->in([
33+
__DIR__.'/config',
34+
__DIR__.'/public',
35+
__DIR__.'/src',
36+
__DIR__.'/tests',
37+
])
38+
->append([
39+
__FILE__,
40+
__DIR__.'/bin/console',
41+
__DIR__.'/bin/phpunit',
42+
])
7443
)
7544
;

src/Api/DocumentIdentity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ abstract class DocumentIdentity
1212
private const ID_NS = 'ee5b8c83-f12d-41f5-bcf9-3e83b7558317';
1313

1414
/**
15-
* @param string|DomainId $value
15+
* @param DomainId|string $value
1616
*/
1717
public static function get($value): string
1818
{

src/Api/Projection/UserProjection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class UserProjection
4242
public $id;
4343

4444
/**
45-
* @var string|null Globally unique domain identifier (Optional in "write")
45+
* @var null|string Globally unique domain identifier (Optional in "write")
4646
* @Groups({"user:read", "user:write"})
4747
*/
4848
public $userId;
@@ -54,7 +54,7 @@ class UserProjection
5454
public $email;
5555

5656
/**
57-
* @var string|null Plain password (Required in "write")
57+
* @var null|string Plain password (Required in "write")
5858
* @Groups({"user:write"})
5959
*/
6060
public $password;

src/Api/Serializer/UserNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class UserNormalizer implements NormalizerInterface, CacheableSupportsMeth
1515
* @psalm-suppress MoreSpecificImplementedParamType
1616
*
1717
* @param User $object
18-
* @param string|null $format
18+
* @param null|string $format
1919
*/
2020
public function normalize($object, $format = null, array $context = [])
2121
{

src/Console/ClassContextElementFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public function getElement(string $class, string $method, string $argument): Con
2626
switch ($argument) {
2727
case 'email':
2828
$element->label = 'E-mail';
29-
break;
3029

30+
break;
3131
case 'password':
3232
if (User::class === $class || EmailPassword::class === $class) {
3333
$element
@@ -40,6 +40,7 @@ public function getElement(string $class, string $method, string $argument): Con
4040
})
4141
;
4242
}
43+
4344
break;
4445
}
4546

src/Security/OneTimeLoginAuthenticator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(EntityManagerInterface $em, UserIdentityProvider $us
3131
$this->urlGenerator = $urlGenerator;
3232
}
3333

34-
public function start(Request $request, AuthenticationException $authException = null): Response
34+
public function start(Request $request, ?AuthenticationException $authException = null): Response
3535
{
3636
return new RedirectResponse($this->urlGenerator->generate('login'));
3737
}
@@ -91,7 +91,7 @@ public function supportsRememberMe(): bool
9191

9292
private function getOneTimeLoginToken(string $token): ?OneTimeLoginToken
9393
{
94-
/** @var OneTimeLoginToken|null */
94+
/** @var null|OneTimeLoginToken */
9595
return $this->em->find(OneTimeLoginToken::class, $token);
9696
}
9797

0 commit comments

Comments
 (0)