src/Behat/Behat/Output/Node/Printer/Helper/WidthCalculator.php
public function calculateScenarioHeaderWidth(Scenario $scenario, $indentation)
    {
        $indentText = str_repeat(' ', intval($indentation));

        if ($scenario instanceof ExampleNode) {
            $header = sprintf('%s%s', $indentText, $scenario->getTitle());
        } else {
            $title = $scenario->getTitle();
            $lines = explode("\n", $title);
            $header = sprintf('%s%s: %s', $indentText, $scenario->getKeyword(), array_shift($lines));
        }

        return mb_strlen(rtrim($header), 'utf8');
    }
public function calculateScenarioHeaderWidth(Scenario $scenario, $indentation)
    {
        $indentText = str_repeat(' ', intval($indentation));

        if ($scenario instanceof ExampleNode) {
            $header = sprintf('%s%s', $indentText, $scenario->getTitle());
        } else {
            $title = $scenario->getTitle();
            $lines = explode("\n", $title);
            $header = sprintf('%s%s: %s', $indentText, $scenario->getKeyword(), array_shift($lines));
        }

        return mb_strlen(rtrim($header), 'utf8');
    }
public function calculateScenarioHeaderWidth ( Scenario $ scenario , $ indentation ) { $ indentText = str_repeat ( ' ' , intval ( $ indentation ) ) ; if ( $ scenario instanceof ExampleNode ) { $ header = sprintf ( '%s%s' , $ indentText , $ scenario -> getTitle ( ) ) ; } else { $ title = $ scenario -> getTitle ( ) ; $ lines = explode ( "\n" , $ title ) ; $ header = sprintf ( '%s%s: %s' , $ indentText , $ scenario -> getKeyword ( ) , array_shift ( $ lines ) ) ; } return mb_strlen ( rtrim ( $ header ) , 'utf8' ) ; }
Calculates scenario header width.

@param Scenario $scenario
@param integer  $indentation

@return integer
Calculates scenario header width .