Skip to content

Commit 7c98027

Browse files
[DI] fix docblocks in Container*
1 parent 76a5165 commit 7c98027

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Container.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ public function setParameter($name, $value)
162162
* Setting a synthetic service to null resets it: has() returns false and get()
163163
* behaves in the same way as if the service was never created.
164164
*
165-
* @param string $id The service identifier
166-
* @param object $service The service instance
165+
* @param string $id The service identifier
166+
* @param object|null $service The service instance
167167
*/
168168
public function set($id, $service)
169169
{
@@ -263,7 +263,7 @@ public function has($id)
263263
* @param string $id The service identifier
264264
* @param int $invalidBehavior The behavior when the service does not exist
265265
*
266-
* @return object The associated service
266+
* @return object|null The associated service
267267
*
268268
* @throws ServiceCircularReferenceException When a circular reference is detected
269269
* @throws ServiceNotFoundException When the service is not defined

ContainerBuilder.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,8 @@ public function getCompiler()
519519
/**
520520
* Sets a service.
521521
*
522-
* @param string $id The service identifier
523-
* @param object $service The service instance
522+
* @param string $id The service identifier
523+
* @param object|null $service The service instance
524524
*
525525
* @throws BadMethodCallException When this ContainerBuilder is compiled
526526
*/
@@ -571,7 +571,7 @@ public function has($id)
571571
* @param string $id The service identifier
572572
* @param int $invalidBehavior The behavior when the service does not exist
573573
*
574-
* @return object The associated service
574+
* @return object|null The associated service
575575
*
576576
* @throws InvalidArgumentException when no definitions are available
577577
* @throws ServiceCircularReferenceException When a circular reference is detected
@@ -1104,7 +1104,7 @@ public function findDefinition($id)
11041104
* @param string $id The service identifier
11051105
* @param bool $tryProxy Whether to try proxying the service with a lazy proxy
11061106
*
1107-
* @return object The service described by the service definition
1107+
* @return mixed The service described by the service definition
11081108
*
11091109
* @throws RuntimeException When the factory definition is incomplete
11101110
* @throws RuntimeException When the service is a synthetic service
@@ -1651,7 +1651,7 @@ private function callMethod($service, $call, array &$inlineServices)
16511651
* Shares a given service in the container.
16521652
*
16531653
* @param Definition $definition
1654-
* @param object $service
1654+
* @param mixed $service
16551655
* @param string|null $id
16561656
*/
16571657
private function shareService(Definition $definition, $service, $id, array &$inlineServices)

ContainerInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ interface ContainerInterface extends PsrContainerInterface
3232
/**
3333
* Sets a service.
3434
*
35-
* @param string $id The service identifier
36-
* @param object $service The service instance
35+
* @param string $id The service identifier
36+
* @param object|null $service The service instance
3737
*/
3838
public function set($id, $service);
3939

@@ -43,7 +43,7 @@ public function set($id, $service);
4343
* @param string $id The service identifier
4444
* @param int $invalidBehavior The behavior when the service does not exist
4545
*
46-
* @return object The associated service
46+
* @return object|null The associated service
4747
*
4848
* @throws ServiceCircularReferenceException When a circular reference is detected
4949
* @throws ServiceNotFoundException When the service is not defined

0 commit comments

Comments
 (0)