@@ -89,7 +89,7 @@ An anonymous function can be used to filter with more complex criteria::
8989 $crawler = $crawler
9090 ->filter('body > p')
9191 ->reduce(function (Crawler $node, $i) {
92- // filter every other node
92+ // filters every other node
9393 return ($i % 2) == 0;
9494 });
9595
@@ -185,7 +185,7 @@ Accessing Node Values
185185
186186Access the node name (HTML tag name) of the first node of the current selection (eg. "p" or "div")::
187187
188- // will return the node name (HTML tag name) of the first child element under <body>
188+ // returns the node name (HTML tag name) of the first child element under <body>
189189 $tag = $crawler->filterXPath('//body/*')->nodeName();
190190
191191Access the value of the first node of the current selection::
@@ -367,7 +367,7 @@ instance with just the selected link(s). Calling ``link()`` gives you a special
367367The :class: `Symfony\\ Component\\ DomCrawler\\ Link ` object has several useful
368368methods to get more information about the selected link itself::
369369
370- // return the proper URI that can be used to make another request
370+ // returns the proper URI that can be used to make another request
371371 $uri = $link->getUri();
372372
373373.. note ::
@@ -441,13 +441,13 @@ attribute followed by a query string of all of the form's values.
441441
442442You can virtually set and get values on the form::
443443
444- // set values on the form internally
444+ // sets values on the form internally
445445 $form->setValues(array(
446446 'registration[username]' => 'symfonyfan',
447447 'registration[terms]' => 1,
448448 ));
449449
450- // get back an array of values - in the "flat" array like above
450+ // gets back an array of values - in the "flat" array like above
451451 $values = $form->getValues();
452452
453453 // returns the values like PHP would see them,
@@ -464,10 +464,10 @@ To work with multi-dimensional fields::
464464
465465Pass an array of values::
466466
467- // Set a single field
467+ // sets a single field
468468 $form->setValues(array('multi' => array('value')));
469469
470- // Set multiple fields at once
470+ // sets multiple fields at once
471471 $form->setValues(array('multi' => array(
472472 1 => 'value',
473473 'dimensional' => 'an other value'
@@ -479,17 +479,17 @@ and uploading files::
479479
480480 $form['registration[username]']->setValue('symfonyfan');
481481
482- // check or uncheck a checkbox
482+ // checks or unchecks a checkbox
483483 $form['registration[terms]']->tick();
484484 $form['registration[terms]']->untick();
485485
486- // select an option
486+ // selects an option
487487 $form['registration[birthday][year]']->select(1984);
488488
489- // select many options from a "multiple" select
489+ // selects many options from a "multiple" select
490490 $form['registration[interests]']->select(array('symfony', 'cookies'));
491491
492- // even fake a file upload
492+ // fakes a file upload
493493 $form['registration[photo]']->upload('/path/to/lucas.jpg');
494494
495495Using the Form Data
@@ -518,7 +518,7 @@ directly::
518518
519519 use Goutte\Client;
520520
521- // make a real request to an external site
521+ // makes a real request to an external site
522522 $client = new Client();
523523 $crawler = $client->request('GET', 'https://github.com/login');
524524
@@ -527,7 +527,7 @@ directly::
527527 $form['login'] = 'symfonyfan';
528528 $form['password'] = 'anypass';
529529
530- // submit that form
530+ // submits the given form
531531 $crawler = $client->submit($form);
532532
533533.. _components-dom-crawler-invalid :
@@ -540,10 +540,10 @@ to prevent you from setting invalid values. If you want to be able to set
540540invalid values, you can use the ``disableValidation() `` method on either
541541the whole form or specific field(s)::
542542
543- // Disable validation for a specific field
543+ // disables validation for a specific field
544544 $form['country']->disableValidation()->select('Invalid value');
545545
546- // Disable validation for the whole form
546+ // disables validation for the whole form
547547 $form->disableValidation();
548548 $form['country']->select('Invalid value');
549549
0 commit comments