Skip to content

Commit 4b85897

Browse files
Release v3.1.31 (#6944)
Co-authored-by: Deeka Wong <[email protected]>
1 parent f36e0c5 commit 4b85897

File tree

1 file changed

+9
-27
lines changed

1 file changed

+9
-27
lines changed

src/Container.php

+9-27
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,7 @@ public function __construct(protected Definition\DefinitionSourceInterface $defi
4949
}
5050

5151
/**
52-
* Build an entry of the container by its name.
53-
* This method behave like get() except resolves the entry again every time.
54-
* For example if the entry is a class then a new instance will be created each time.
55-
* This method makes the container behave like a factory.
56-
*
57-
* @param string $name entry name or a class name
58-
* @param array $parameters Optional parameters to use to build the entry. Use this to force specific parameters
59-
* to specific values. Parameters not defined in this array will be resolved using
60-
* the container.
61-
* @throws NotFoundException no entry found for the given name
62-
* @throws InvalidArgumentException the name parameter must be of type string
52+
* @internal
6353
*/
6454
public function make(string $name, array $parameters = [])
6555
{
@@ -73,8 +63,7 @@ public function make(string $name, array $parameters = [])
7363
}
7464

7565
/**
76-
* Bind an arbitrary resolved entry to an identifier.
77-
* Useful for testing 'get'.
66+
* @internal
7867
* @param mixed $entry
7968
*/
8069
public function set(string $name, $entry): void
@@ -83,7 +72,7 @@ public function set(string $name, $entry): void
8372
}
8473

8574
/**
86-
* Unbind an arbitrary resolved entry.
75+
* @internal
8776
*/
8877
public function unbind(string $name): void
8978
{
@@ -93,20 +82,17 @@ public function unbind(string $name): void
9382
}
9483

9584
/**
96-
* Bind an arbitrary definition to an identifier.
97-
* Useful for testing 'make'.
98-
*
99-
* @param array|callable|string $definition
85+
* @internal
86+
* @param mixed $definition
10087
*/
10188
public function define(string $name, $definition): void
10289
{
10390
$this->setDefinition($name, $definition);
10491
}
10592

10693
/**
107-
* Finds an entry of the container by its identifier and returns it.
108-
*
109-
* @param string $id identifier of the entry to look for
94+
* @internal
95+
* @param mixed $id
11096
*/
11197
public function get($id)
11298
{
@@ -118,12 +104,8 @@ public function get($id)
118104
}
119105

120106
/**
121-
* Returns true if the container can return an entry for the given identifier.
122-
* Returns false otherwise.
123-
* `has($name)` returning true does not mean that `get($name)` will not throw an exception.
124-
* It does however mean that `get($name)` will not throw a `NotFoundExceptionInterface`.
125-
*
126-
* @param mixed|string $id identifier of the entry to look for
107+
* @internal
108+
* @param mixed $id
127109
*/
128110
public function has($id): bool
129111
{

0 commit comments

Comments
 (0)