Skip to content

Commit 4f34c3b

Browse files
authored
Merge pull request #72 from soenru/feature/php-cs-fixer-configuration
Coding Style (PHP-CS-Fixer)
2 parents d3b04a6 + 38ce47c commit 4f34c3b

File tree

5 files changed

+207
-131
lines changed

5 files changed

+207
-131
lines changed

.php_cs

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->in(__DIR__ . '/src');
5+
6+
return PhpCsFixer\Config::create()
7+
->setRiskyAllowed(true)
8+
->setUsingCache(false)
9+
->setRules([
10+
'@PSR2' => true,
11+
'align_multiline_comment' => true,
12+
'array_indentation' => true,
13+
'array_syntax' => ['syntax' => 'short'],
14+
'binary_operator_spaces' => ['default' => 'align_single_space_minimal'],
15+
'blank_line_after_opening_tag' => true,
16+
'class_attributes_separation' => true,
17+
'combine_consecutive_issets' => true,
18+
'general_phpdoc_annotation_remove' => ['annotations' => ['author', 'package', 'subpackage']],
19+
'declare_equal_normalize' => ['space' => 'single'],
20+
'dir_constant' => true,
21+
'fully_qualified_strict_types' => true,
22+
'function_typehint_space' => true,
23+
'heredoc_to_nowdoc' => true,
24+
'include' => true,
25+
'is_null' => ['use_yoda_style' => true],
26+
'linebreak_after_opening_tag' => true,
27+
'lowercase_cast' => true,
28+
'modernize_types_casting' => true,
29+
'new_with_braces' => true,
30+
'no_alias_functions' => true,
31+
'no_alternative_syntax' => true,
32+
'no_blank_lines_after_phpdoc' => true,
33+
'no_empty_comment' => true,
34+
'no_empty_phpdoc' => true,
35+
'no_empty_statement' => true,
36+
'no_leading_import_slash' => true,
37+
'no_leading_namespace_whitespace' => true,
38+
'no_mixed_echo_print' => ['use' => 'echo'],
39+
'no_multiline_whitespace_before_semicolons' => true,
40+
'no_null_property_initialization' => true,
41+
'no_php4_constructor' => true,
42+
'no_short_echo_tag' => false,
43+
'no_unreachable_default_argument_value' => true,
44+
'no_useless_else' => true,
45+
'no_useless_return' => true,
46+
'ordered_class_elements' => true,
47+
'ordered_imports' => true,
48+
'phpdoc_add_missing_param_annotation' => ['only_untyped' => false],
49+
'phpdoc_order' => true,
50+
'phpdoc_return_self_reference' => true,
51+
'phpdoc_scalar' => true,
52+
'phpdoc_single_line_var_spacing' => true,
53+
'phpdoc_to_comment' => true,
54+
'phpdoc_trim' => true,
55+
'phpdoc_types' => true,
56+
'phpdoc_types_order' => ['null_adjustment' => 'always_last'],
57+
'phpdoc_var_without_name' => true,
58+
'short_scalar_cast' => true,
59+
'simplified_null_return' => true,
60+
'single_blank_line_before_namespace' => true,
61+
'single_line_comment_style' => true,
62+
'single_quote' => ['strings_containing_single_quote_chars' => true],
63+
'standardize_increment' => true,
64+
'standardize_not_equals' => true,
65+
'trailing_comma_in_multiline_array' => true,
66+
'trim_array_spaces' => true,
67+
'whitespace_after_comma_in_array' => true,
68+
'yoda_style' => true,
69+
])
70+
->setFinder($finder);

src/Grant/JwtBearer.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace TheNetworg\OAuth2\Client\Grant;
34

45
class JwtBearer extends \League\OAuth2\Client\Grant\AbstractGrant
@@ -12,7 +13,7 @@ protected function getRequiredRequestParameters()
1213
{
1314
return [
1415
'requested_token_use',
15-
'assertion'
16+
'assertion',
1617
];
1718
}
18-
}
19+
}

0 commit comments

Comments
 (0)