Skip to content

Commit 403aeca

Browse files
Make code more readable.
1 parent e2b575d commit 403aeca

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

PHP/CodeCoverage/Util.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ class PHP_CodeCoverage_Util
6464
'getLinesToBeIgnored' => array()
6565
);
6666

67+
/**
68+
* @var array
69+
*/
70+
protected static $templateMethods = array(
71+
'setUp', 'assertPreConditions', 'assertPostConditions', 'tearDown'
72+
);
73+
6774
/**
6875
* Returns the files and lines a test method wants to cover.
6976
*
@@ -85,7 +92,7 @@ public static function getLinesToBeCovered($className, $methodName)
8592
$method = new ReflectionMethod($className, $methodName);
8693
$docComment = $class->getDocComment() . $method->getDocComment();
8794

88-
foreach (array('setUp', 'assertPreConditions', 'assertPostConditions', 'tearDown') as $templateMethod) {
95+
foreach (self::$templateMethods as $templateMethod) {
8996
if ($class->hasMethod($templateMethod)) {
9097
$reflector = $class->getMethod($templateMethod);
9198
$docComment .= $reflector->getDocComment();

0 commit comments

Comments
 (0)