Skip to content

Commit 9718722

Browse files
committed
Update docs
1 parent ef1b1f8 commit 9718722

36 files changed

+131
-115
lines changed

.docheader

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
* @link https://github.com/php-fast-forward/container
88
* @copyright Copyright (c) 2025-%year% Felipe Sayão Lobato Abreu <[email protected]>
99
* @license https://opensource.org/licenses/MIT MIT License
10+
* @see https://datatracker.ietf.org/doc/html/rfc2119
1011
*/

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ jobs:
7070
uses: phpDocumentor/[email protected]
7171
with:
7272
target: 'public/'
73+
template: 'responsive-twig'
7374

7475
- name: Upload artifact
7576
if: github.ref == 'refs/heads/main'

.php-cs-fixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* @link https://github.com/php-fast-forward/container
1212
* @copyright Copyright (c) 2025 Felipe Sayão Lobato Abreu <[email protected]>
1313
* @license https://opensource.org/licenses/MIT MIT License
14+
* @see https://datatracker.ietf.org/doc/html/rfc2119
1415
*/
1516

1617
use CoiSA\PhpCsFixer\PhpCsFixer;

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
}
5454
},
5555
"scripts": {
56-
"cs-check": "php-cs-fixer fix --dry-run --diff",
57-
"cs-fix": "php-cs-fixer fix",
58-
"docs": "phpdoc",
56+
"cs-check": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix --dry-run --diff",
57+
"cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix",
58+
"docs": "vendor/bin/phpdoc.phar",
5959
"mutation-testing": "infection --threads=4",
6060
"pre-commit": [
6161
"@cs-check",

src/AggregateContainer.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* @link https://github.com/php-fast-forward/container
1212
* @copyright Copyright (c) 2025 Felipe Sayão Lobato Abreu <[email protected]>
1313
* @license https://opensource.org/licenses/MIT MIT License
14+
* @see https://datatracker.ietf.org/doc/html/rfc2119
1415
*/
1516

1617
namespace FastForward\Container;
@@ -21,15 +22,12 @@
2122
use Psr\Container\NotFoundExceptionInterface;
2223

2324
/**
24-
* Class AggregateContainer.
25-
*
2625
* Aggregates multiple PSR-11 containers and delegates resolution requests among them.
27-
* This container implementation MUST respect PSR-11 expectations and SHALL throw a
28-
* NotFoundException when a requested service cannot be found in any delegated container.
2926
*
30-
* It MAY cache resolved entries to prevent redundant calls to delegated containers.
27+
* This container implementation respects PSR-11 expectations and throws a
28+
* NotFoundException when a requested service cannot be found in any delegated container.
3129
*
32-
* @package FastForward\Container
30+
* It caches resolved entries to prevent redundant calls to delegated containers.
3331
*/
3432
class AggregateContainer implements ContainerInterface
3533
{
@@ -168,7 +166,7 @@ public function get(string $id): mixed
168166
/**
169167
* Determines whether the identifier has already been resolved by this container.
170168
*
171-
* This method SHALL be used internally to avoid unnecessary delegation to sub-containers.
169+
* This method is used internally to avoid unnecessary delegation to sub-containers.
172170
*
173171
* @param string $id the identifier to check
174172
*

src/AutowireContainer.php

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* @link https://github.com/php-fast-forward/container
1212
* @copyright Copyright (c) 2025 Felipe Sayão Lobato Abreu <[email protected]>
1313
* @license https://opensource.org/licenses/MIT MIT License
14+
* @see https://datatracker.ietf.org/doc/html/rfc2119
1415
*/
1516

1617
namespace FastForward\Container;
@@ -21,11 +22,11 @@
2122
use Psr\Container\NotFoundExceptionInterface;
2223

2324
/**
24-
* Class AutowireContainer.
25-
*
2625
* A composite container implementation that wraps another PSR-11 container and appends
27-
* an internal PHP-DI autowiring container. It provides auto-resolution of services
28-
* while maintaining compatibility with pre-defined service providers.
26+
* an internal PHP-DI autowiring container.
27+
*
28+
* It provides auto-resolution of services while maintaining compatibility with
29+
* pre-defined service providers.
2930
*
3031
* This container MUST be used in scenarios where automatic dependency resolution
3132
* via autowiring is required alongside explicitly registered services.
@@ -73,16 +74,6 @@ public function get(string $id): mixed
7374
return $this->container->get($id);
7475
}
7576

76-
/**
77-
* Determines whether the container can return an entry for the given identifier.
78-
*
79-
* This method attempts to resolve the entry to confirm that it is not only registered,
80-
* but also valid and free of runtime errors during instantiation.
81-
*
82-
* @param string $id identifier of the entry to check
83-
*
84-
* @return bool true if the container can return the entry, false otherwise
85-
*/
8677
public function has(string $id): bool
8778
{
8879
if (!$this->container->has($id)) {

src/ContainerInterface.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@
1111
* @link https://github.com/php-fast-forward/container
1212
* @copyright Copyright (c) 2025 Felipe Sayão Lobato Abreu <[email protected]>
1313
* @license https://opensource.org/licenses/MIT MIT License
14+
* @see https://datatracker.ietf.org/doc/html/rfc2119
1415
*/
1516

1617
namespace FastForward\Container;
1718

1819
use Psr\Container\ContainerInterface as PsrContainerInterface;
1920

2021
/**
21-
* Interface ContainerInterface
22-
*
2322
* Extends the PSR-11 ContainerInterface to provide a consistent, domain-specific container interface
24-
* for the FastForward ecosystem. This interface SHALL serve as the preferred type hint within FastForward
25-
* components, while maintaining full compatibility with PSR-11 standards.
23+
* for the FastForward ecosystem.
24+
*
25+
* This interface SHALL serve as the preferred type hint within FastForward components, while maintaining
26+
* full compatibility with PSR-11 standards.
2627
*
2728
* Implementations of this interface MUST adhere to the behavior defined by PSR-11, specifically:
2829
*

src/Exception/ContainerException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
* @link https://github.com/php-fast-forward/container
1212
* @copyright Copyright (c) 2025 Felipe Sayão Lobato Abreu <[email protected]>
1313
* @license https://opensource.org/licenses/MIT MIT License
14+
* @see https://datatracker.ietf.org/doc/html/rfc2119
1415
*/
1516

1617
namespace FastForward\Container\Exception;
1718

1819
use Psr\Container\ContainerExceptionInterface;
1920

2021
/**
21-
* Class ContainerException.
22+
* Exception type for container-related errors while resolving services.
2223
*
23-
* Exception type for container-related errors in the event dispatcher.
2424
* This class MUST be used to signal problems occurring during service resolution
2525
* from a container that complies with PSR-11.
2626
*

src/Exception/InvalidArgumentException.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@
1111
* @link https://github.com/php-fast-forward/container
1212
* @copyright Copyright (c) 2025 Felipe Sayão Lobato Abreu <[email protected]>
1313
* @license https://opensource.org/licenses/MIT MIT License
14+
* @see https://datatracker.ietf.org/doc/html/rfc2119
1415
*/
1516

1617
namespace FastForward\Container\Exception;
1718

1819
/**
19-
* Class InvalidArgumentException.
20+
* Exception thrown when an invalid or unsupported argument is passed to a function or method within the container.
2021
*
21-
* Exception thrown when an argument passed to a function or method is invalid or unsupported.
22-
* This exception MUST be used when a container initializer does not match any of the allowed types.
22+
* This exception helps identify and handle errors related to invalid or unrecognized arguments,
23+
* especially when an unsupported initializer type is provided to the container builder.
2324
*
2425
* @package FastForward\Container\Exception
2526
*/

src/Exception/NotFoundException.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@
1111
* @link https://github.com/php-fast-forward/container
1212
* @copyright Copyright (c) 2025 Felipe Sayão Lobato Abreu <[email protected]>
1313
* @license https://opensource.org/licenses/MIT MIT License
14+
* @see https://datatracker.ietf.org/doc/html/rfc2119
1415
*/
1516

1617
namespace FastForward\Container\Exception;
1718

1819
use Psr\Container\NotFoundExceptionInterface;
1920

2021
/**
21-
* Class NotFoundException.
22-
*
2322
* Exception thrown when a requested service identifier is not found in the container.
2423
*
2524
* This class MUST be used in PSR-11 container implementations to represent an error

0 commit comments

Comments
 (0)