src/Behat/Gherkin/Lexer.php
protected function scanStep()
    {
        if (!$this->allowSteps) {
            return null;
        }

        $keywords = $this->getKeywords('Step');
        if (!preg_match('/^\s*(' . $keywords . ')([^\s].+)/u', $this->line, $matches)) {
            return null;
        }

        $keyword = trim($matches[1]);
        $token = $this->takeToken('Step', $keyword);
        $token['keyword_type'] = $this->getStepKeywordType($keyword);
        $token['text'] = $matches[2];

        $this->consumeLine();
        $this->allowMultilineArguments = true;

        return $token;
    }
protected function scanStep()
    {
        if (!$this->allowSteps) {
            return null;
        }

        $keywords = $this->getKeywords('Step');
        if (!preg_match('/^\s*(' . $keywords . ')([^\s].+)/u', $this->line, $matches)) {
            return null;
        }

        $keyword = trim($matches[1]);
        $token = $this->takeToken('Step', $keyword);
        $token['keyword_type'] = $this->getStepKeywordType($keyword);
        $token['text'] = $matches[2];

        $this->consumeLine();
        $this->allowMultilineArguments = true;

        return $token;
    }
protected function scanStep ( ) { if ( ! $ this -> allowSteps ) { return null ; } $ keywords = $ this -> getKeywords ( 'Step' ) ; if ( ! preg_match ( '/^\s*(' . $ keywords . ')([^\s].+)/u' , $ this -> line , $ matches ) ) { return null ; } $ keyword = trim ( $ matches [ 1 ] ) ; $ token = $ this -> takeToken ( 'Step' , $ keyword ) ; $ token [ 'keyword_type' ] = $ this -> getStepKeywordType ( $ keyword ) ; $ token [ 'text' ] = $ matches [ 2 ] ; $ this -> consumeLine ( ) ; $ this -> allowMultilineArguments = true ; return $ token ; }
Scans Step from input & returns it if found.

@return null|array
Scans Step from input & returns it if found .