@@ -87,7 +87,7 @@ An anonymous function can be used to filter with more complex criteria::
8787 $crawler = $crawler
8888 ->filter('body > p')
8989 ->reduce(function (Crawler $node, $i) {
90- // filter every other node
90+ // filters every other node
9191 return ($i % 2) == 0;
9292 });
9393
@@ -196,7 +196,7 @@ Accessing Node Values
196196
197197Access the node name (HTML tag name) of the first node of the current selection (eg. "p" or "div")::
198198
199- // will return the node name (HTML tag name) of the first child element under <body>
199+ // returns the node name (HTML tag name) of the first child element under <body>
200200 $tag = $crawler->filterXPath('//body/*')->nodeName();
201201
202202Access the value of the first node of the current selection::
@@ -317,7 +317,7 @@ instance with just the selected link(s). Calling ``link()`` gives you a special
317317The :class: `Symfony\\ Component\\ DomCrawler\\ Link ` object has several useful
318318methods to get more information about the selected link itself::
319319
320- // return the proper URI that can be used to make another request
320+ // returns the proper URI that can be used to make another request
321321 $uri = $link->getUri();
322322
323323.. note ::
@@ -368,13 +368,13 @@ attribute followed by a query string of all of the form's values.
368368
369369You can virtually set and get values on the form::
370370
371- // set values on the form internally
371+ // sets values on the form internally
372372 $form->setValues(array(
373373 'registration[username]' => 'symfonyfan',
374374 'registration[terms]' => 1,
375375 ));
376376
377- // get back an array of values - in the "flat" array like above
377+ // gets back an array of values - in the "flat" array like above
378378 $values = $form->getValues();
379379
380380 // returns the values like PHP would see them,
@@ -391,10 +391,10 @@ To work with multi-dimensional fields::
391391
392392Pass an array of values::
393393
394- // Set a single field
394+ // sets a single field
395395 $form->setValues(array('multi' => array('value')));
396396
397- // Set multiple fields at once
397+ // sets multiple fields at once
398398 $form->setValues(array('multi' => array(
399399 1 => 'value',
400400 'dimensional' => 'an other value'
@@ -406,17 +406,17 @@ and uploading files::
406406
407407 $form['registration[username]']->setValue('symfonyfan');
408408
409- // check or uncheck a checkbox
409+ // checks or unchecks a checkbox
410410 $form['registration[terms]']->tick();
411411 $form['registration[terms]']->untick();
412412
413- // select an option
413+ // selects an option
414414 $form['registration[birthday][year]']->select(1984);
415415
416- // select many options from a "multiple" select
416+ // selects many options from a "multiple" select
417417 $form['registration[interests]']->select(array('symfony', 'cookies'));
418418
419- // even fake a file upload
419+ // fakes a file upload
420420 $form['registration[photo]']->upload('/path/to/lucas.jpg');
421421
422422Using the Form Data
@@ -445,7 +445,7 @@ directly::
445445
446446 use Goutte\Client;
447447
448- // make a real request to an external site
448+ // makes a real request to an external site
449449 $client = new Client();
450450 $crawler = $client->request('GET', 'https://github.com/login');
451451
@@ -454,7 +454,7 @@ directly::
454454 $form['login'] = 'symfonyfan';
455455 $form['password'] = 'anypass';
456456
457- // submit that form
457+ // submits the given form
458458 $crawler = $client->submit($form);
459459
460460.. _components-dom-crawler-invalid :
@@ -467,10 +467,10 @@ to prevent you from setting invalid values. If you want to be able to set
467467invalid values, you can use the ``disableValidation() `` method on either
468468the whole form or specific field(s)::
469469
470- // Disable validation for a specific field
470+ // disables validation for a specific field
471471 $form['country']->disableValidation()->select('Invalid value');
472472
473- // Disable validation for the whole form
473+ // disables validation for the whole form
474474 $form->disableValidation();
475475 $form['country']->select('Invalid value');
476476
0 commit comments