Skip to content

Commit 427a763

Browse files
committed
Fix code-style
1 parent ba12887 commit 427a763

File tree

4 files changed

+51
-6
lines changed

4 files changed

+51
-6
lines changed

.docheader

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/**
2-
* This file is part of php-fast-forward/http-message.
2+
* This file is part of php-fast-forward/http.
33
*
44
* This source file is subject to the license bundled
55
* with this source code in the file LICENSE.
66
*
7-
* @link https://github.com/php-fast-forward/http-message
7+
* @link https://github.com/php-fast-forward/http
88
* @copyright Copyright (c) 2025-%year% Felipe Sayão Lobato Abreu <[email protected]>
99
* @license https://opensource.org/licenses/MIT MIT License
1010
*/

.php-cs-fixer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
declare(strict_types=1);
44

55
/**
6-
* This file is part of php-fast-forward/http-message.
6+
* This file is part of php-fast-forward/http.
77
*
88
* This source file is subject to the license bundled
99
* with this source code in the file LICENSE.
1010
*
11-
* @link https://github.com/php-fast-forward/http-message
11+
* @link https://github.com/php-fast-forward/http
1212
* @copyright Copyright (c) 2025 Felipe Sayão Lobato Abreu <[email protected]>
1313
* @license https://opensource.org/licenses/MIT MIT License
1414
*/

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
}
4747
},
4848
"scripts": {
49-
"cs-check": "php-cs-fixer fix --dry-run --diff",
50-
"cs-fix": "php-cs-fixer fix",
49+
"cs-check": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix --dry-run --diff",
50+
"cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix",
5151
"mutation-testing": "infection --threads=4",
5252
"pre-commit": [
5353
"@cs-check",

src/ServiceProvider/HttpServiceProvider.php

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,47 @@
11
<?php
22

3+
declare(strict_types=1);
4+
5+
/**
6+
* This file is part of php-fast-forward/http.
7+
*
8+
* This source file is subject to the license bundled
9+
* with this source code in the file LICENSE.
10+
*
11+
* @link https://github.com/php-fast-forward/http
12+
* @copyright Copyright (c) 2025 Felipe Sayão Lobato Abreu <[email protected]>
13+
* @license https://opensource.org/licenses/MIT MIT License
14+
*/
15+
316
namespace FastForward\Http\ServiceProvider;
417

518
use FastForward\Container\ServiceProvider\AggregateServiceProvider;
619
use FastForward\Http\Client\ServiceProvider\HttpClientServiceProvider;
720
use FastForward\Http\Message\Factory\ServiceProvider\HttpMessageFactoryServiceProvider;
821
use Interop\Container\ServiceProviderInterface;
922

23+
/**
24+
* Class HttpServiceProvider
25+
*
26+
* Aggregates and registers HTTP-related service providers. This class SHALL encapsulate the
27+
* dependencies for HTTP client and message factory services within the container.
28+
*
29+
* It MUST implement the ServiceProviderInterface and MUST delegate factory and extension
30+
* retrieval to the internal AggregateServiceProvider instance.
31+
*/
1032
final class HttpServiceProvider implements ServiceProviderInterface
1133
{
34+
/**
35+
* @var ServiceProviderInterface The aggregate service provider that includes all HTTP service providers.
36+
*/
1237
private ServiceProviderInterface $serviceProvider;
1338

39+
/**
40+
* Constructs the HttpServiceProvider.
41+
*
42+
* This constructor MUST initialize the internal service provider as an instance of
43+
* AggregateServiceProvider composed of HTTP-related service providers.
44+
*/
1445
public function __construct()
1546
{
1647
$this->serviceProvider = new AggregateServiceProvider(
@@ -19,11 +50,25 @@ public function __construct()
1950
);
2051
}
2152

53+
/**
54+
* Returns an array of factory callables provided by the aggregate service provider.
55+
*
56+
* This method MUST delegate the call to the internal AggregateServiceProvider.
57+
*
58+
* @return array<string, callable> A map of service identifiers to factory callables.
59+
*/
2260
public function getFactories(): array
2361
{
2462
return $this->serviceProvider->getFactories();
2563
}
2664

65+
/**
66+
* Returns an array of service extension callables provided by the aggregate service provider.
67+
*
68+
* This method MUST delegate the call to the internal AggregateServiceProvider.
69+
*
70+
* @return array<string, callable> A map of service identifiers to extension callables.
71+
*/
2772
public function getExtensions(): array
2873
{
2974
return $this->serviceProvider->getExtensions();

0 commit comments

Comments
 (0)