@@ -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::
@@ -358,7 +358,7 @@ instance with just the selected link(s). Calling ``link()`` gives you a special
358358The :class: `Symfony\\ Component\\ DomCrawler\\ Link ` object has several useful
359359methods to get more information about the selected link itself::
360360
361- // return the proper URI that can be used to make another request
361+ // returns the proper URI that can be used to make another request
362362 $uri = $link->getUri();
363363
364364.. note ::
@@ -433,13 +433,13 @@ attribute followed by a query string of all of the form's values.
433433
434434You can virtually set and get values on the form::
435435
436- // set values on the form internally
436+ // sets values on the form internally
437437 $form->setValues(array(
438438 'registration[username]' => 'symfonyfan',
439439 'registration[terms]' => 1,
440440 ));
441441
442- // get back an array of values - in the "flat" array like above
442+ // gets back an array of values - in the "flat" array like above
443443 $values = $form->getValues();
444444
445445 // returns the values like PHP would see them,
@@ -456,10 +456,10 @@ To work with multi-dimensional fields::
456456
457457Pass an array of values::
458458
459- // Set a single field
459+ // sets a single field
460460 $form->setValues(array('multi' => array('value')));
461461
462- // Set multiple fields at once
462+ // sets multiple fields at once
463463 $form->setValues(array('multi' => array(
464464 1 => 'value',
465465 'dimensional' => 'an other value'
@@ -471,17 +471,17 @@ and uploading files::
471471
472472 $form['registration[username]']->setValue('symfonyfan');
473473
474- // check or uncheck a checkbox
474+ // checks or unchecks a checkbox
475475 $form['registration[terms]']->tick();
476476 $form['registration[terms]']->untick();
477477
478- // select an option
478+ // selects an option
479479 $form['registration[birthday][year]']->select(1984);
480480
481- // select many options from a "multiple" select
481+ // selects many options from a "multiple" select
482482 $form['registration[interests]']->select(array('symfony', 'cookies'));
483483
484- // even fake a file upload
484+ // fakes a file upload
485485 $form['registration[photo]']->upload('/path/to/lucas.jpg');
486486
487487Using the Form Data
@@ -510,7 +510,7 @@ directly::
510510
511511 use Goutte\Client;
512512
513- // make a real request to an external site
513+ // makes a real request to an external site
514514 $client = new Client();
515515 $crawler = $client->request('GET', 'https://github.com/login');
516516
@@ -519,7 +519,7 @@ directly::
519519 $form['login'] = 'symfonyfan';
520520 $form['password'] = 'anypass';
521521
522- // submit that form
522+ // submits the given form
523523 $crawler = $client->submit($form);
524524
525525.. _components-dom-crawler-invalid :
@@ -532,10 +532,10 @@ to prevent you from setting invalid values. If you want to be able to set
532532invalid values, you can use the ``disableValidation() `` method on either
533533the whole form or specific field(s)::
534534
535- // Disable validation for a specific field
535+ // disables validation for a specific field
536536 $form['country']->disableValidation()->select('Invalid value');
537537
538- // Disable validation for the whole form
538+ // disables validation for the whole form
539539 $form->disableValidation();
540540 $form['country']->select('Invalid value');
541541
0 commit comments