src/Ciconia/Extension/Core/WhitespaceExtension.php
public function detab(Text $text, array $options = array())
    {
        /** @noinspection PhpUnusedParameterInspection */
        $text->replace('/(.*?)\t/', function (Text $whole, Text $string) use ($options) {
            return $string . str_repeat(' ', $options['tabWidth'] - $string->getLength() % $options['tabWidth']);
        });
    }
public function detab(Text $text, array $options = array())
    {
        /** @noinspection PhpUnusedParameterInspection */
        $text->replace('/(.*?)\t/', function (Text $whole, Text $string) use ($options) {
            return $string . str_repeat(' ', $options['tabWidth'] - $string->getLength() % $options['tabWidth']);
        });
    }
Convert tabs to spaces

@param Text  $text
@param array $options