@@ -149,7 +149,7 @@ and adding a priority.
149149
150150 While adding a priority is optional, it's recommended to add one to
151151 make sure the expected value is injected. The ``ArgumentFromAttributeResolver ``
152- has a priority of 100. As this one is responsible for fetching attributes
152+ has a priority of 100. As this one is responsible for fetching attributes
153153 from the ``Request ``, it's also recommended to trigger your custom value
154154 resolver with a lower priority. This makes sure the argument resolvers
155155 are not triggered in (e.g.) subrequests if you pass your user along:
@@ -197,8 +197,6 @@ and adding a priority.
197197 $definition->addTag('controller.argument_value_resolver', array('priority' => 50));
198198 $container->setDefinition('app.value_resolver.user', $definition);
199199
200- .. _`yield` :http://php.net/manual/en/language.generators.syntax.php
201-
202200 Creating an Optional User Resolver
203201----------------------------------
204202
@@ -209,13 +207,17 @@ method signature to `UserInterface $user = null`.
209207
210208When you take the ``UserValueResolver `` from the previous example, you can
211209see there is no logic in case of failure to comply to the requirements. Default
212- valuesin are defined in the signature and are available in the ``ArgumentMetadata ``.
210+ values are defined in the signature and are available in the ``ArgumentMetadata ``.
213211When a default value is available and there are no resolvers that support
214212the given value, the ``DefaultValueResolver `` is triggered. This Resolver
215213takes the default value of your argument and yields it to the argument list::
216214
217215 namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;
218216
217+ use Symfony\Component\HttpFoundation\Request;
218+ use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface;
219+ use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
220+
219221 final class DefaultValueResolver implements ArgumentValueResolverInterface
220222 {
221223 public function supports(Request $request, ArgumentMetadata $argument)
@@ -228,3 +230,5 @@ takes the default value of your argument and yields it to the argument list::
228230 yield $argument->getDefaultValue();
229231 }
230232 }
233+
234+ .. _`yield` :http://php.net/manual/en/language.generators.syntax.php