Skip to content

Commit 1607759

Browse files
committed
minor #28301 Fix code examples in PHPDoc (maidmaid)
This PR was merged into the 2.8 branch. Discussion ---------- Fix code examples in PHPDoc | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | / | License | MIT | Doc PR | / This PR properly indents the code examples in PHPDoc for a clean render. Commits ------- 1afb043dc5 Fix code examples in PHPDoc
2 parents 01b722a + 700bdb3 commit 1607759

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

Container.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,9 @@
3333
* A service can also be defined by creating a method named
3434
* getXXXService(), where XXX is the camelized version of the id:
3535
*
36-
* <ul>
37-
* <li>request -> getRequestService()</li>
38-
* <li>mysql_session_storage -> getMysqlSessionStorageService()</li>
39-
* <li>symfony.mysql_session_storage -> getSymfony_MysqlSessionStorageService()</li>
40-
* </ul>
36+
* * request -> getRequestService()
37+
* * mysql_session_storage -> getMysqlSessionStorageService()
38+
* * symfony.mysql_session_storage -> getSymfony_MysqlSessionStorageService()
4139
*
4240
* The container can have three possible behaviors when a service does not exist:
4341
*

ContainerBuilder.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,10 @@ public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INV
493493
* the parameters passed to the container constructor to have precedence
494494
* over the loaded ones.
495495
*
496-
* $container = new ContainerBuilder(new ParameterBag(array('foo' => 'bar')));
497-
* $loader = new LoaderXXX($container);
498-
* $loader->load('resource_name');
499-
* $container->register('foo', 'stdClass');
496+
* $container = new ContainerBuilder(new ParameterBag(array('foo' => 'bar')));
497+
* $loader = new LoaderXXX($container);
498+
* $loader->load('resource_name');
499+
* $container->register('foo', 'stdClass');
500500
*
501501
* In the above example, even if the loaded resource defines a foo
502502
* parameter, the value will still be 'bar' as defined in the ContainerBuilder
@@ -999,14 +999,14 @@ private function doResolveServices($value, \SplObjectStorage $inlinedDefinitions
999999
*
10001000
* Example:
10011001
*
1002-
* $container->register('foo')->addTag('my.tag', array('hello' => 'world'));
1002+
* $container->register('foo')->addTag('my.tag', array('hello' => 'world'));
10031003
*
1004-
* $serviceIds = $container->findTaggedServiceIds('my.tag');
1005-
* foreach ($serviceIds as $serviceId => $tags) {
1006-
* foreach ($tags as $tag) {
1007-
* echo $tag['hello'];
1004+
* $serviceIds = $container->findTaggedServiceIds('my.tag');
1005+
* foreach ($serviceIds as $serviceId => $tags) {
1006+
* foreach ($tags as $tag) {
1007+
* echo $tag['hello'];
1008+
* }
10081009
* }
1009-
* }
10101010
*
10111011
* @param string $name The tag name
10121012
*

0 commit comments

Comments
 (0)