Refactoring Utils

This removes duplication regarding the `calculateIndent` function, adds missing docblocks, and adds tests for the `calculateIndent` function too.
Depends what whitespace token contents you passed
Op 19 dec. 2014 08:30 schreef "Dariusz Rumiński" <notifications@github.com>:

> In Symfony/CS/Utils.php
> <https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/904#discussion-diff-22092771>
> :
>
> >      public static function splitLines($content)
> >      {
> >          preg_match_all("/[^\n\r]+[\r\n]*/", $content, $matches);
> >
> >          return $matches[0];
> >      }
> > +
> > +    /**
> > +     * Calculate used indentation in whitespace.
> > +     *
> > +     * What we're doing here is grabbing everything after the final newline.
> > +     *
> > +     * @param string $content
> > +     *
> > +     * @return string
> > +     */
> > +    public static function calculateIndent($content)
>
> calculate indent means to me that I have some content, which is indented,
> and I need to calculate what the Indent is.
> So if I have ____$bar = 1;_ content it will returns me ____.
> But it gives me only _.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/904/files#r22092771>.
>