original_string: protected function find($selector, $locator, $exception = false, $node = false, $timeout = false) {
  
          // Throw exception, so dev knows it is not supported.
          if ($selector === 'named') {
              $exception = 'Using the "named" selector is deprecated as of 3.1. '
                  .' Use the "named_partial" or use the "named_exact" selector instead.';
              throw new ExpectationException($exception, $this->getSession());
          }
  
          // Returns the first match.
          $items = $this->find_all($selector, $locator, $exception, $node, $timeout);
          return count($items) ? reset($items) : null;
      }
code: protected function find($selector, $locator, $exception = false, $node = false, $timeout = false) {
  
          // Throw exception, so dev knows it is not supported.
          if ($selector === 'named') {
              $exception = 'Using the "named" selector is deprecated as of 3.1. '
                  .' Use the "named_partial" or use the "named_exact" selector instead.';
              throw new ExpectationException($exception, $this->getSession());
          }
  
          // Returns the first match.
          $items = $this->find_all($selector, $locator, $exception, $node, $timeout);
          return count($items) ? reset($items) : null;
      }
code_tokens: protected function find ( $ selector , $ locator , $ exception = false , $ node = false , $ timeout = false ) { // Throw exception, so dev knows it is not supported. if ( $ selector === 'named' ) { $ exception = 'Using the "named" selector is deprecated as of 3.1. ' . ' Use the "named_partial" or use the "named_exact" selector instead.' ; throw new ExpectationException ( $ exception , $ this -> getSession ( ) ) ; } // Returns the first match. $ items = $ this -> find_all ( $ selector , $ locator , $ exception , $ node , $ timeout ) ; return count ( $ items ) ? reset ( $ items ) : null ; }
docstring: Returns the first matching element.
  
  @link http://mink.behat.org/#traverse-the-page-selectors
  @param string $selector The selector type (css, xpath, named...)
  @param mixed $locator It depends on the $selector, can be the xpath, a name, a css locator...
  @param Exception $exception Otherwise we throw exception with generic info
  @param NodeElement $node Spins around certain DOM node instead of the whole page
  @param int $timeout Forces a specific time out (in seconds).
  @return NodeElement
docstring_tokens: Returns the first matching element .