src/Behat/Behat/Context/Snippet/Generator/ContextSnippetGenerator.php
private function getUniqueMethodName($contextClass, $stepPattern, $name)
    {
        $reflection = new ReflectionClass($contextClass);

        $number = $this->getMethodNumberFromTheMethodName($name);
        list($name, $number) = $this->getMethodNameNotExistentInContext($reflection, $name, $number);
        $name = $this->getMethodNameNotProposedEarlier($contextClass, $stepPattern, $name, $number);

        return $name;
    }
private function getUniqueMethodName($contextClass, $stepPattern, $name)
    {
        $reflection = new ReflectionClass($contextClass);

        $number = $this->getMethodNumberFromTheMethodName($name);
        list($name, $number) = $this->getMethodNameNotExistentInContext($reflection, $name, $number);
        $name = $this->getMethodNameNotProposedEarlier($contextClass, $stepPattern, $name, $number);

        return $name;
    }
private function getUniqueMethodName ( $ contextClass , $ stepPattern , $ name ) { $ reflection = new ReflectionClass ( $ contextClass ) ; $ number = $ this -> getMethodNumberFromTheMethodName ( $ name ) ; list ( $ name , $ number ) = $ this -> getMethodNameNotExistentInContext ( $ reflection , $ name , $ number ) ; $ name = $ this -> getMethodNameNotProposedEarlier ( $ contextClass , $ stepPattern , $ name , $ number ) ; return $ name ; }
Ensures uniqueness of the method name in the context.

@param string $contextClass
@param string $stepPattern
@param string $name

@return string
Ensures uniqueness of the method name in the context .