Doctrine::compile() refactored
This commit is contained in:
parent
31bfa23340
commit
82c13ca1da
18
Doctrine.php
18
Doctrine.php
@ -371,21 +371,11 @@ final class Doctrine {
|
|||||||
$refl = new ReflectionClass ( $class );
|
$refl = new ReflectionClass ( $class );
|
||||||
$lines = file( $file );
|
$lines = file( $file );
|
||||||
|
|
||||||
$start = $refl->getStartLine() - 1;
|
$ret = array_merge($ret,
|
||||||
$end = $refl->getEndLine() - 2;
|
array_slice($lines,
|
||||||
|
$refl -> getStartLine() - 1,
|
||||||
|
$refl -> getEndLine() - 2));
|
||||||
|
|
||||||
$i = 0;
|
|
||||||
while($i < count($lines)) {
|
|
||||||
$i++;
|
|
||||||
|
|
||||||
if($i < $start)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
$ret[] = $lines[$i];
|
|
||||||
|
|
||||||
if($i > $end)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user