zendframework/zf2 — pull request #1797 by EvanDotPro (2012-07-08 06:33:12+00:00)
Title: Get class content with multiline class declaration

When you have a class declared such as:

class Foo
extends Bar
implements Baz
{
/* ... */
}

The ClassReflection::getContent() method would not work properly, as
getStartLine() returns the line number immediately following the 'class'
keyword, regardless of how many lines the class declaration is spanned
over. Thus, you'd end up with some of the class declaration sometimes.
This patch starts at the 'class' keyword, and finds the first '{', and
considers that the start of the class. This is not 100% perfect, but
should cover 99% of cases.

Also, the getContent() method was using array_splice(), however,
array_slice() is more appropriate.