Skip to content

Commit 3a4f43f

Browse files
Remove PHP_CodeCoverage_Util::getSafeFilename().
1 parent 72ef762 commit 3a4f43f

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

PHP/CodeCoverage/Util.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -342,20 +342,6 @@ public static function getLinesToBeIgnored($filename)
342342
return self::$ignoredLines[$filename];
343343
}
344344

345-
/**
346-
* Returns a filesystem safe version of the passed filename.
347-
* This function does not operate on full paths, just filenames.
348-
*
349-
* @param string $filename
350-
* @return string
351-
* @author Michael Lively Jr. <[email protected]>
352-
*/
353-
public static function getSafeFilename($filename)
354-
{
355-
/* characters allowed: A-Z, a-z, 0-9, _ and . */
356-
return preg_replace('#[^\w.]#', '_', $filename);
357-
}
358-
359345
/**
360346
* @param float $a
361347
* @param float $b

Tests/PHP/CodeCoverage/UtilTest.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -355,20 +355,6 @@ public function testGetDirectory3()
355355
);
356356
}
357357

358-
/**
359-
* @covers PHP_CodeCoverage_Util::getSafeFilename
360-
*/
361-
public function testGetSafeFilename()
362-
{
363-
$this->assertEquals(
364-
'foo', PHP_CodeCoverage_Util::getSafeFilename('foo')
365-
);
366-
367-
$this->assertEquals(
368-
'foo_bar', PHP_CodeCoverage_Util::getSafeFilename('foo/bar')
369-
);
370-
}
371-
372358
/**
373359
* @covers PHP_CodeCoverage_Util::percent
374360
*/

0 commit comments

Comments
 (0)