@@ -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
@@ -183,7 +183,7 @@ Accessing Node Values
183183
184184Access the node name (HTML tag name) of the first node of the current selection (eg. "p" or "div")::
185185
186- // will return the node name (HTML tag name) of the first child element under <body>
186+ // returns the node name (HTML tag name) of the first child element under <body>
187187 $tag = $crawler->filterXPath('//body/*')->nodeName();
188188
189189Access the value of the first node of the current selection::
@@ -304,7 +304,7 @@ instance with just the selected link(s). Calling ``link()`` gives you a special
304304The :class: `Symfony\\ Component\\ DomCrawler\\ Link ` object has several useful
305305methods to get more information about the selected link itself::
306306
307- // return the proper URI that can be used to make another request
307+ // returns the proper URI that can be used to make another request
308308 $uri = $link->getUri();
309309
310310.. note ::
@@ -355,13 +355,13 @@ attribute followed by a query string of all of the form's values.
355355
356356You can virtually set and get values on the form::
357357
358- // set values on the form internally
358+ // sets values on the form internally
359359 $form->setValues(array(
360360 'registration[username]' => 'symfonyfan',
361361 'registration[terms]' => 1,
362362 ));
363363
364- // get back an array of values - in the "flat" array like above
364+ // gets back an array of values - in the "flat" array like above
365365 $values = $form->getValues();
366366
367367 // returns the values like PHP would see them,
@@ -378,10 +378,10 @@ To work with multi-dimensional fields::
378378
379379Pass an array of values::
380380
381- // Set a single field
381+ // sets a single field
382382 $form->setValues(array('multi' => array('value')));
383383
384- // Set multiple fields at once
384+ // sets multiple fields at once
385385 $form->setValues(array('multi' => array(
386386 1 => 'value',
387387 'dimensional' => 'an other value'
@@ -393,17 +393,17 @@ and uploading files::
393393
394394 $form['registration[username]']->setValue('symfonyfan');
395395
396- // check or uncheck a checkbox
396+ // checks or unchecks a checkbox
397397 $form['registration[terms]']->tick();
398398 $form['registration[terms]']->untick();
399399
400- // select an option
400+ // selects an option
401401 $form['registration[birthday][year]']->select(1984);
402402
403- // select many options from a "multiple" select
403+ // selects many options from a "multiple" select
404404 $form['registration[interests]']->select(array('symfony', 'cookies'));
405405
406- // even fake a file upload
406+ // fakes a file upload
407407 $form['registration[photo]']->upload('/path/to/lucas.jpg');
408408
409409Using the Form Data
@@ -432,7 +432,7 @@ directly::
432432
433433 use Goutte\Client;
434434
435- // make a real request to an external site
435+ // makes a real request to an external site
436436 $client = new Client();
437437 $crawler = $client->request('GET', 'https://github.com/login');
438438
@@ -441,7 +441,7 @@ directly::
441441 $form['login'] = 'symfonyfan';
442442 $form['password'] = 'anypass';
443443
444- // submit that form
444+ // submits the given form
445445 $crawler = $client->submit($form);
446446
447447.. _components-dom-crawler-invalid :
@@ -454,10 +454,10 @@ to prevent you from setting invalid values. If you want to be able to set
454454invalid values, you can use the ``disableValidation() `` method on either
455455the whole form or specific field(s)::
456456
457- // Disable validation for a specific field
457+ // disables validation for a specific field
458458 $form['country']->disableValidation()->select('Invalid value');
459459
460- // Disable validation for the whole form
460+ // disables validation for the whole form
461461 $form->disableValidation();
462462 $form['country']->select('Invalid value');
463463
0 commit comments