Skip to content

Commit

Permalink
Fix code examples in PHPDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
maidmaid committed Aug 29, 2018
1 parent ad2446d commit 700bdb3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
8 changes: 3 additions & 5 deletions Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@
* A service can also be defined by creating a method named
* getXXXService(), where XXX is the camelized version of the id:
*
* <ul>
* <li>request -> getRequestService()</li>
* <li>mysql_session_storage -> getMysqlSessionStorageService()</li>
* <li>symfony.mysql_session_storage -> getSymfony_MysqlSessionStorageService()</li>
* </ul>
* * request -> getRequestService()
* * mysql_session_storage -> getMysqlSessionStorageService()
* * symfony.mysql_session_storage -> getSymfony_MysqlSessionStorageService()
*
* The container can have three possible behaviors when a service does not exist:
*
Expand Down
20 changes: 10 additions & 10 deletions ContainerBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,10 @@ public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INV
* the parameters passed to the container constructor to have precedence
* over the loaded ones.
*
* $container = new ContainerBuilder(new ParameterBag(array('foo' => 'bar')));
* $loader = new LoaderXXX($container);
* $loader->load('resource_name');
* $container->register('foo', 'stdClass');
* $container = new ContainerBuilder(new ParameterBag(array('foo' => 'bar')));
* $loader = new LoaderXXX($container);
* $loader->load('resource_name');
* $container->register('foo', 'stdClass');
*
* In the above example, even if the loaded resource defines a foo
* parameter, the value will still be 'bar' as defined in the ContainerBuilder
Expand Down Expand Up @@ -999,14 +999,14 @@ private function doResolveServices($value, \SplObjectStorage $inlinedDefinitions
*
* Example:
*
* $container->register('foo')->addTag('my.tag', array('hello' => 'world'));
* $container->register('foo')->addTag('my.tag', array('hello' => 'world'));
*
* $serviceIds = $container->findTaggedServiceIds('my.tag');
* foreach ($serviceIds as $serviceId => $tags) {
* foreach ($tags as $tag) {
* echo $tag['hello'];
* $serviceIds = $container->findTaggedServiceIds('my.tag');
* foreach ($serviceIds as $serviceId => $tags) {
* foreach ($tags as $tag) {
* echo $tag['hello'];
* }
* }
* }
*
* @param string $name The tag name
*
Expand Down

0 comments on commit 700bdb3

Please sign in to comment.