Skip to content

Commit 469bd98

Browse files
committed
cs fixer update
1 parent 1b3063e commit 469bd98

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+397
-406
lines changed

.github/workflows/static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ jobs:
3131
uses: actions/checkout@v3
3232

3333
- name: PHP-CS-Fixer
34-
uses: docker://oskarstark/php-cs-fixer-ga:2.19.0
34+
uses: docker://oskarstark/php-cs-fixer-ga
3535
with:
3636
args: --dry-run --diff-format udiff

.php-cs-fixer.cache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"php":"8.2.4","version":"3.16.0:v3.16.0#d40f9436e1c448d309fa995ab9c14c5c7a96f2dc","indent":" ","lineEnding":"\n","rules":{"array_syntax":true,"backtick_to_shell_exec":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["return"]},"cast_spaces":true,"class_attributes_separation":{"elements":{"method":"one"}},"class_definition":{"single_line":true},"class_reference_name_casing":true,"clean_namespace":true,"concat_space":true,"curly_braces_position":{"allow_single_line_anonymous_functions":true,"allow_single_line_empty_anonymous_classes":true},"declare_parentheses":true,"echo_tag_syntax":true,"empty_loop_body":{"style":"braces"},"empty_loop_condition":true,"fully_qualified_strict_types":true,"function_typehint_space":true,"general_phpdoc_tag_rename":{"replacements":{"inheritDocs":"inheritDoc"}},"global_namespace_import":{"import_classes":false,"import_constants":false,"import_functions":false},"include":true,"increment_style":true,"integer_literal_case":true,"lambda_not_used_import":true,"linebreak_after_opening_tag":true,"magic_constant_casing":true,"magic_method_casing":true,"method_argument_space":{"on_multiline":"ignore"},"native_function_casing":true,"native_function_type_declaration_casing":true,"no_alias_language_construct_call":true,"no_alternative_syntax":true,"no_binary_string":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_extra_blank_lines":{"tokens":["attribute","case","continue","curly_brace_block","default","extra","parenthesis_brace_block","square_brace_block","switch","throw","use"]},"no_leading_namespace_whitespace":true,"no_mixed_echo_print":true,"no_multiline_whitespace_around_double_arrow":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_spaces_around_offset":true,"no_superfluous_phpdoc_tags":{"allow_mixed":true,"allow_unused_params":true},"no_trailing_comma_in_singleline":true,"no_unneeded_control_parentheses":{"statements":["break","clone","continue","echo_print","others","return","switch_case","yield","yield_from"]},"no_unneeded_curly_braces":{"namespaces":true},"no_unneeded_import_alias":true,"no_unset_cast":true,"no_unused_imports":true,"no_useless_concat_operator":true,"no_useless_nullsafe_operator":true,"no_whitespace_before_comma_in_array":true,"normalize_index_brace":true,"object_operator_without_whitespace":true,"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"alpha"},"php_unit_fqcn_annotation":true,"php_unit_method_casing":true,"phpdoc_align":true,"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag_normalizer":true,"phpdoc_no_access":true,"phpdoc_no_alias_tag":true,"phpdoc_no_package":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_order":{"order":["param","return","throws"]},"phpdoc_return_self_reference":true,"phpdoc_scalar":true,"phpdoc_separation":true,"phpdoc_single_line_var_spacing":true,"phpdoc_summary":true,"phpdoc_tag_type":{"tags":{"inheritDoc":"inline"}},"phpdoc_to_comment":true,"phpdoc_trim":true,"phpdoc_trim_consecutive_blank_line_separation":true,"phpdoc_types":true,"phpdoc_types_order":{"null_adjustment":"always_last","sort_algorithm":"none"},"phpdoc_var_without_name":true,"protected_to_private":true,"semicolon_after_instruction":true,"simple_to_complex_string_variable":true,"single_class_element_per_statement":true,"single_import_per_statement":true,"single_line_comment_spacing":true,"single_line_comment_style":{"comment_types":["hash"]},"single_quote":true,"single_space_around_construct":true,"space_after_semicolon":{"remove_in_empty_for_expressions":true},"standardize_increment":true,"standardize_not_equals":true,"switch_continue_to_break":true,"trailing_comma_in_multiline":true,"trim_array_spaces":true,"types_spaces":true,"unary_operator_spaces":true,"whitespace_after_comma_in_array":true,"yoda_style":true,"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"compact_nullable_typehint":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"return_type_declaration":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_line_after_imports":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true},"hashes":{"src\/Builder\/ResponseBuilder.php":"6134bba97a19b5810de790c69654d2e9","src\/RequestMatcher\/RegexRequestMatcher.php":"b8b2cb626be23c32b8e72885c0d781a5","src\/RequestMatcher\/CallbackRequestMatcher.php":"1f7697bd77d19bdc8f176fbfd2eb6594","src\/RequestMatcher\/RequestMatcher.php":"4688ebb21a796b954c0ec11c35cb8fb8","src\/UriFactory\/DiactorosUriFactory.php":"28ebc75e73d5a84e1db52953fea6f8f9","src\/UriFactory\/SlimUriFactory.php":"225bf9e857e0f687f312e49e153078db","src\/UriFactory\/GuzzleUriFactory.php":"adcc383089228f796ca8f3ede2e75501","src\/Formatter.php":"b2652b63e08ee97833910085e6314a5d","src\/CookieJar.php":"473927281018d7c5f7637f587715ed12","src\/Stream\/BufferedStream.php":"ba96e9b19e1b4982239d69d25cc0a1d7","src\/Formatter\/CurlCommandFormatter.php":"8bf7d76e1e3e9373614478935ddcd692","src\/Formatter\/FullHttpMessageFormatter.php":"ec39148f93e7f16d0483a2348f6b8a18","src\/Formatter\/SimpleFormatter.php":"b46525c54ba25e962d97914fa62f74da","src\/filters.php":"75842241e48344a273f7557139c7fbd5","src\/StreamFactory\/GuzzleStreamFactory.php":"a364013edfac479b8fbe7e367b8486b8","src\/StreamFactory\/DiactorosStreamFactory.php":"16a8397acc4e71e6b87628c731de5dcb","src\/StreamFactory\/SlimStreamFactory.php":"e807bb7aa46f4fd3893b4a14b6055028","src\/Exception.php":"3092183a6f7eaba4d2d7c08cc7f47e6c","src\/Exception\/UnexpectedValueException.php":"2caf2db48be5022d9c3027f53aee4da7","src\/MessageFactory\/GuzzleMessageFactory.php":"02ef83128c1ab374a65fd99990b9fb5c","src\/MessageFactory\/DiactorosMessageFactory.php":"e8e8ab3c71caa44e0f0bf26f37e16f56","src\/MessageFactory\/SlimMessageFactory.php":"63704710096a0c010aa9a65312ecc953","src\/Authentication\/AutoBasicAuth.php":"3e4b110653b227aae736ef07f5ed64df","src\/Authentication\/BasicAuth.php":"59a0549cd129c7653040726b225f96b2","src\/Authentication\/Chain.php":"cfb084036254f9bb9732cb99e48c71d8","src\/Authentication\/Wsse.php":"cdcf7e0afc23eeeaf249e043238b2392","src\/Authentication\/QueryParam.php":"6f8235d34195fdc9a19a39d81961e91e","src\/Authentication\/RequestConditional.php":"617f2e0e6c2a38a6baa25f601937bf50","src\/Authentication\/Header.php":"e91be7cf7ae9a7b27e143b166facf14a","src\/Authentication\/Bearer.php":"b8ed727eb81506fa9f6e54162d4d073f","src\/Authentication\/Matching.php":"d487896d1b9a8b0e3b952174b694c10a","src\/Authentication.php":"685c142bb46f0f7a454bd45339b4dfa7","src\/Cookie.php":"cb2d802173d16e99d0ab4d4b464fd837","src\/Encoding\/DechunkStream.php":"51d01c085a4a1b9f98b2a42b771f5bc5","src\/Encoding\/DeflateStream.php":"daa8aab7df58cd56e84fcd72a138cebe","src\/Encoding\/CompressStream.php":"db39c01a631f4c4d5d0e56dfb36d0564","src\/Encoding\/DecompressStream.php":"c50e8e80f759ef6059b0a1ef342d2c10","src\/Encoding\/ChunkStream.php":"986e9bcac6d0fc9e226787a171eca8d3","src\/Encoding\/GzipEncodeStream.php":"0e0aafdd88ad43a47f29ca2d36845b29","src\/Encoding\/InflateStream.php":"a57536435d3db09d88314824d7523d1d","src\/Encoding\/GzipDecodeStream.php":"7dad020873e552d63e1d3a2d835f1a50","src\/Encoding\/FilteredStream.php":"a605fc11c86efc13706b6e666b1f7b4d","src\/Encoding\/Filter\/Chunk.php":"6191a278c0a6d98314ab98546d6445f8","src\/Decorator\/MessageDecorator.php":"5466783ae38982930ee3946a6e63519e","src\/Decorator\/ResponseDecorator.php":"6cdee50d4144754f722fc11e68e0d4d3","src\/Decorator\/StreamDecorator.php":"9fe85dd0f11bef8fcc1eb359a834e6c2","src\/Decorator\/RequestDecorator.php":"cd9abd3414a3beaed2d93a1b31b9749d","src\/RequestMatcher.php":"f94134f6e7907204929b904c94893293","src\/CookieUtil.php":"d8d7c3b8851021c0cb5232b6899687c0","spec\/Builder\/ResponseBuilderSpec.php":"894270195a1c7c9492aacf4fd9a62a02","spec\/RequestMatcher\/RegexRequestMatcherSpec.php":"9ed6df1506df5619f1c3937a9876fd5d","spec\/RequestMatcher\/RequestMatcherSpec.php":"f10332a462c469ce2878cbbbe3036bb7","spec\/RequestMatcher\/CallbackRequestMatcherSpec.php":"92345d480c0baa4889bf73378f75d3db","spec\/UriFactory\/UriFactoryBehavior.php":"26b04d5bd0866c0bfd6fc3d7e6e7a50e","spec\/UriFactory\/GuzzleUriFactorySpec.php":"9af6ee82648212e20684bee94eae48ce","spec\/UriFactory\/DiactorosUriFactorySpec.php":"1461e0f5862f2b7006a8a315e0d9d725","spec\/UriFactory\/SlimUriFactorySpec.php":"5e1e3f8ae4bb4f4949271ffdb5151e34","spec\/CookieJarSpec.php":"8ca3289d07c0c0ada2e7e37e4e3acec7","spec\/Stream\/BufferedStreamSpec.php":"42b4320321ab41f2d46134b4b709e07d","spec\/CookieUtilSpec.php":"e34475c8b20c5f2038ca07f413ca47b2","spec\/Formatter\/FullHttpMessageFormatterSpec.php":"7f6c0c8e90d3572e0ca10151705166c8","spec\/Formatter\/CurlCommandFormatterSpec.php":"2276e2ed38672c27a6f0528479ce6a7f","spec\/Formatter\/SimpleFormatterSpec.php":"e2b8c7aa1740ff8704b1bd47383990f9","spec\/StreamFactory\/StreamFactoryBehavior.php":"659fc298da780cb891e6d8fc585b518d","spec\/StreamFactory\/SlimStreamFactorySpec.php":"b4a20baf06bdcc9a71b9056b1dced493","spec\/StreamFactory\/GuzzleStreamFactorySpec.php":"dcaaa913b9a8db8553eeec830ed88fb7","spec\/StreamFactory\/DiactorosStreamFactorySpec.php":"856fd5528ff683d59f3c461330f5ae67","spec\/MessageFactory\/GuzzleMessageFactorySpec.php":"4c6c9e67f10b07f6bfe67f47a02482f5","spec\/MessageFactory\/MessageFactoryBehavior.php":"8766ff58e59d1fbe391897ed5bdc0115","spec\/MessageFactory\/DiactorosMessageFactorySpec.php":"f5788d4becf673f756dd08afdd823fb1","spec\/MessageFactory\/SlimMessageFactorySpec.php":"a0fb048af6d3ae8768b85f39d81d1aae","spec\/Authentication\/ChainSpec.php":"f5a456e48de6a9d93df8a37394c2a809","spec\/Authentication\/BearerSpec.php":"5df940c49b4d52afc96902c264109820","spec\/Authentication\/QueryParamSpec.php":"91d20956d3ee16f2a98080ab7619b5ff","spec\/Authentication\/WsseSpec.php":"de28c36f4faf43500e3f9d8418027115","spec\/Authentication\/RequestConditionalSpec.php":"a71df45ee432d62ce3799e20da9cdff0","spec\/Authentication\/AutoBasicAuthSpec.php":"67b52c07bc3f0c4c9e1284450e49ae19","spec\/Authentication\/BasicAuthSpec.php":"a6ce659bf42c89cba1288663e03623fb","spec\/Authentication\/MatchingSpec.php":"44b7a4c2d72705c5849f2c7edc95b7ea","spec\/Authentication\/HeaderSpec.php":"c99fa14664165e76377c868701cdffaa","spec\/Encoding\/DeflateStreamSpec.php":"a4efacaf1c34fbf9d2788f9a7e9a82ea","spec\/Encoding\/GzipEncodeStreamSpec.php":"c52e13bfc92238acb77adf7b0d6ad294","spec\/Encoding\/DecompressStreamSpec.php":"9ae808238e05e12174db704ad29995e0","spec\/Encoding\/ZlibStreamBehavior.php":"8e935e5aa96ff19471c0a10a2ff17eb5","spec\/Encoding\/DechunkStreamSpec.php":"e5c50c935e53e6625c99fa8eedba3e69","spec\/Encoding\/GzipDecodeStreamSpec.php":"80d813dd5b4e47806818f2fbc3fcb6e2","spec\/Encoding\/MemoryStream.php":"b8882cadc040e22e97c06556473bda06","spec\/Encoding\/InflateStreamSpec.php":"94f2a63f69303ddd2870b6d948def4ab","spec\/Encoding\/StreamBehavior.php":"974e8eb1c95cbb46fdae8ec398d1663a","spec\/Encoding\/CompressStreamSpec.php":"2366a69d2d3b93238aea409131931175","spec\/Encoding\/FilteredStreamStubSpec.php":"0ec00ae228ae39b630073a3da51401a0","spec\/Encoding\/ChunkStreamSpec.php":"d6270876ff14452b4434d02b2da29e12","spec\/CookieSpec.php":"70ae7ffb1c2023ae9fe479c0d897a66f","spec\/Decorator\/MessageDecoratorSpec.php":"871397cead8d9b535350ddd300696039","spec\/Decorator\/ResponseDecoratorSpec.php":"3f64664c83a12001a6e4d2c790218b93","spec\/Decorator\/StreamDecoratorSpec.php":"f9a1c6162dc7ece0f86b50d18500ea63","spec\/Decorator\/RequestDecoratorSpec.php":"4733aa62ceae25d67ebacc413cbfc835"}}

.php-cs-fixer.dist.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->in(__DIR__.'/src')
5+
->in(__DIR__.'/spec')
6+
->name('*.php')
7+
;
8+
9+
$config = new PhpCsFixer\Config();
10+
11+
return $config
12+
->setRiskyAllowed(true)
13+
->setRules([
14+
'@Symfony' => true,
15+
'single_line_throw' => false,
16+
])
17+
->setFinder($finder)
18+
;

.php_cs.dist

Lines changed: 0 additions & 17 deletions
This file was deleted.

spec/Authentication/AutoBasicAuthSpec.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,22 @@
33
namespace spec\Http\Message\Authentication;
44

55
use PhpSpec\ObjectBehavior;
6-
use Prophecy\Argument;
76
use Psr\Http\Message\RequestInterface;
87
use Psr\Http\Message\UriInterface;
98

109
class AutoBasicAuthSpec extends ObjectBehavior
1110
{
12-
function it_is_initializable()
11+
public function it_is_initializable()
1312
{
1413
$this->shouldHaveType('Http\Message\Authentication\AutoBasicAuth');
1514
}
1615

17-
function it_is_an_authentication()
16+
public function it_is_an_authentication()
1817
{
1918
$this->shouldImplement('Http\Message\Authentication');
2019
}
2120

22-
function it_authenticates_a_request(
21+
public function it_authenticates_a_request(
2322
RequestInterface $request,
2423
UriInterface $uri,
2524
UriInterface $uriWithoutUserInfo,
@@ -38,7 +37,7 @@ function it_authenticates_a_request(
3837
$this->authenticate($request)->shouldReturn($authenticatedRequest);
3938
}
4039

41-
function it_authenticates_a_request_without_password(
40+
public function it_authenticates_a_request_without_password(
4241
RequestInterface $request,
4342
UriInterface $uri,
4443
UriInterface $uriWithoutUserInfo,
@@ -57,15 +56,15 @@ function it_authenticates_a_request_without_password(
5756
$this->authenticate($request)->shouldReturn($authenticatedRequest);
5857
}
5958

60-
function it_does_not_authenticate_a_request(RequestInterface $request, UriInterface $uri)
59+
public function it_does_not_authenticate_a_request(RequestInterface $request, UriInterface $uri)
6160
{
6261
$request->getUri()->willReturn($uri);
6362
$uri->getUserInfo()->willReturn('');
6463

6564
$this->authenticate($request)->shouldReturn($request);
6665
}
6766

68-
function it_authenticates_a_request_without_user_info_removal(
67+
public function it_authenticates_a_request_without_user_info_removal(
6968
RequestInterface $request,
7069
UriInterface $uri,
7170
RequestInterface $authenticatedRequest

spec/Authentication/BasicAuthSpec.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22

33
namespace spec\Http\Message\Authentication;
44

5-
use Psr\Http\Message\RequestInterface;
65
use PhpSpec\ObjectBehavior;
6+
use Psr\Http\Message\RequestInterface;
77

88
class BasicAuthSpec extends ObjectBehavior
99
{
10-
function let()
10+
public function let()
1111
{
1212
$this->beConstructedWith('john.doe', 'secret');
1313
}
1414

15-
function it_is_initializable()
15+
public function it_is_initializable()
1616
{
1717
$this->shouldHaveType('Http\Message\Authentication\BasicAuth');
1818
}
1919

20-
function it_is_an_authentication()
20+
public function it_is_an_authentication()
2121
{
2222
$this->shouldImplement('Http\Message\Authentication');
2323
}
2424

25-
function it_authenticates_a_request(RequestInterface $request, RequestInterface $newRequest)
25+
public function it_authenticates_a_request(RequestInterface $request, RequestInterface $newRequest)
2626
{
2727
$request->withHeader('Authorization', 'Basic '.base64_encode('john.doe:secret'))->willReturn($newRequest);
2828

spec/Authentication/BearerSpec.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22

33
namespace spec\Http\Message\Authentication;
44

5-
use Psr\Http\Message\RequestInterface;
65
use PhpSpec\ObjectBehavior;
6+
use Psr\Http\Message\RequestInterface;
77

88
class BearerSpec extends ObjectBehavior
99
{
10-
function let()
10+
public function let()
1111
{
1212
$this->beConstructedWith('token');
1313
}
1414

15-
function it_is_initializable()
15+
public function it_is_initializable()
1616
{
1717
$this->shouldHaveType('Http\Message\Authentication\Bearer');
1818
}
1919

20-
function it_is_an_authentication()
20+
public function it_is_an_authentication()
2121
{
2222
$this->shouldImplement('Http\Message\Authentication');
2323
}
2424

25-
function it_authenticates_a_request(RequestInterface $request, RequestInterface $newRequest)
25+
public function it_authenticates_a_request(RequestInterface $request, RequestInterface $newRequest)
2626
{
2727
$request->withHeader('Authorization', 'Bearer token')->willReturn($newRequest);
2828

spec/Authentication/ChainSpec.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@
33
namespace spec\Http\Message\Authentication;
44

55
use Http\Message\Authentication;
6-
use Psr\Http\Message\RequestInterface;
76
use PhpSpec\ObjectBehavior;
7+
use Psr\Http\Message\RequestInterface;
88

99
class ChainSpec extends ObjectBehavior
1010
{
11-
function it_is_initializable()
11+
public function it_is_initializable()
1212
{
1313
$this->shouldHaveType('Http\Message\Authentication\Chain');
1414
}
1515

16-
function it_is_an_authentication()
16+
public function it_is_an_authentication()
1717
{
1818
$this->shouldImplement('Http\Message\Authentication');
1919
}
2020

21-
function it_throws_an_exception_when_non_authentication_is_passed()
21+
public function it_throws_an_exception_when_non_authentication_is_passed()
2222
{
2323
$this->beConstructedWith(['authentication']);
2424

2525
$this->shouldThrow('InvalidArgumentException')->duringInstantiation();
2626
}
2727

28-
function it_authenticates_a_request(
28+
public function it_authenticates_a_request(
2929
Authentication $auth1,
3030
Authentication $auth2,
3131
RequestInterface $originalRequest,

spec/Authentication/HeaderSpec.php

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

88
class HeaderSpec extends ObjectBehavior
99
{
10-
function let()
10+
public function let()
1111
{
1212
$this->beConstructedWith('X-AUTH-TOKEN', 'REAL');
1313
}
1414

15-
function it_is_initializable()
15+
public function it_is_initializable()
1616
{
1717
$this->shouldHaveType('Http\Message\Authentication\Header');
1818
}
1919

20-
function it_is_an_authentication()
20+
public function it_is_an_authentication()
2121
{
2222
$this->shouldImplement('Http\Message\Authentication');
2323
}
2424

25-
function it_authenticates_a_request(RequestInterface $request, RequestInterface $newRequest)
25+
public function it_authenticates_a_request(RequestInterface $request, RequestInterface $newRequest)
2626
{
2727
$request->withHeader('X-AUTH-TOKEN', 'REAL')->willReturn($newRequest);
2828

0 commit comments

Comments
 (0)