Improved Utility Functions

I want to use this in some of my upcoming fixers.
I think its usefull, but prefer countLines() as it can give you an asnwer
to 2 questions, how many lines does it contain and how many newlines, while
the current implementation only has an asnwer to the last one.



2014-12-17 0:55 GMT+01:00 Graham Campbell <notifications@github.com>:
>
> In Symfony/CS/Utils.php
> <https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/878#discussion-diff-21943045>
> :
>
> >      public static function splitLines($content)
> >      {
> >          preg_match_all("/[^\n\r]+[\r\n]*/", $content, $matches);
> >
> >          return $matches[0];
> >      }
> > +
> > +    /**
> > +     * Count the number of newline characters in a string.
>
> @keradus <https://github.com/keradus> There are two cases here already,
> included in this pull.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/878/files#r21943045>.
>