src/Constraints/FormFieldConstraint.php
protected function field(Crawler $crawler)
    {
        $field = $crawler->filter(implode(', ', $this->getElements()));

        if ($field->count() > 0) {
            return $field;
        }

        $this->fail($crawler, sprintf(
            'There is no %s with the name or ID [%s]',
            $this->validElements(), $this->selector
        ));
    }
protected function field(Crawler $crawler)
    {
        $field = $crawler->filter(implode(', ', $this->getElements()));

        if ($field->count() > 0) {
            return $field;
        }

        $this->fail($crawler, sprintf(
            'There is no %s with the name or ID [%s]',
            $this->validElements(), $this->selector
        ));
    }
protected function field ( Crawler $ crawler ) { $ field = $ crawler -> filter ( implode ( ', ' , $ this -> getElements ( ) ) ) ; if ( $ field -> count ( ) > 0 ) { return $ field ; } $ this -> fail ( $ crawler , sprintf ( 'There is no %s with the name or ID [%s]' , $ this -> validElements ( ) , $ this -> selector ) ) ; }
Get the form field.

@param  \Symfony\Component\DomCrawler\Crawler  $crawler
@return \Symfony\Component\DomCrawler\Crawler

@throws \PHPUnit\Framework\ExpectationFailedException
Get the form field .