8000 merged branch ruian/patch-2 (PR #6028) · symfony/symfony@4ad1e14 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4ad1e14

Browse files
committed
merged branch ruian/patch-2 (PR #6028)
This PR was merged into the master branch. Commits ------- 83b37ff [DependencyInjection] Return self for add... Discussion ---------- [DependencyInjection] Return self for add... Bug fix: no Forget fix: yes Feature addition: no Symfony2 tests pass: yes License of the code: MIT Return self instance when call an ADD something method. --------------------------------------------------------------------------- by pborreli at 2012-11-16T13:24:45Z Please fix PHPDoc accordingly --------------------------------------------------------------------------- by ruian at 2012-11-16T13:38:41Z @pborreli done.
2 parents 68ae207 + 83b37ff commit 4ad1e14

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Symfony/Component/DependencyInjection/ContainerBuilder.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ public function setResources(array $resources)
145145
*
146146
* @param object $object An object instance
147147
*
148+
* @return ContainerBuilder The current instance
149+
*
148150
* @api
149151
*/
150152
public function addObjectResource($object)
@@ -153,6 +155,8 @@ public function addObjectResource($object)
153155
do {
154156
$this->addResource(new FileResource($parent->getFileName()));
155157
} while ($parent = $parent->getParentClass());
158+
159+
return $this;
156160
}
157161

158162
/**
@@ -187,6 +191,8 @@ public function loadFromExtension($extension, array $values = array())
187191
* @param CompilerPassInterface $pass A compiler pass
188192
* @param string $type The type of compiler pass
189193
*
194+
* @return ContainerBuilder The current instance
195+
*
190196
* @api
191197
*/
192198
public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION)
@@ -198,6 +204,8 @@ public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig:
198204
$this->compiler->addPass($pass, $type);
199205

200206
$this->addObjectResource($pass);
207+
208+
return $this;
201209
}
202210

203211
/**

0 commit comments

Comments
 (0)
0