Skip to content

Commit 18d9dce

Browse files
Make (almost) all classes final
1 parent ac7a819 commit 18d9dce

37 files changed

+46
-41
lines changed

ChangeLog-6.0.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes of the PHP_CodeCoverage 6.0 release series are documented in
44

55
## [6.0.0] - 2018-02-02
66

7+
### Changed
8+
9+
* Almost all classes are now final
10+
711
### Removed
812

913
* Implemented [#561](https://github.com/sebastianbergmann/php-code-coverage/issues/561): Remove HHVM driver

src/CodeCoverage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/**
2424
* Provides collection functionality for PHP code coverage information.
2525
*/
26-
class CodeCoverage
26+
final class CodeCoverage
2727
{
2828
/**
2929
* @var Driver

src/Driver/PHPDBG.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* @codeCoverageIgnore
1919
*/
20-
class PHPDBG implements Driver
20+
final class PHPDBG implements Driver
2121
{
2222
/**
2323
* Constructor.

src/Driver/Xdebug.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* @codeCoverageIgnore
1919
*/
20-
class Xdebug implements Driver
20+
final class Xdebug implements Driver
2121
{
2222
/**
2323
* Cache the number of lines for each file

src/Exception/CoveredCodeNotExecutedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
/**
1414
* Exception that is raised when covered code is not executed.
1515
*/
16-
class CoveredCodeNotExecutedException extends RuntimeException
16+
final class CoveredCodeNotExecutedException extends RuntimeException
1717
{
1818
}

src/Exception/InvalidArgumentException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace SebastianBergmann\CodeCoverage;
1212

13-
class InvalidArgumentException extends \InvalidArgumentException implements Exception
13+
final class InvalidArgumentException extends \InvalidArgumentException implements Exception
1414
{
1515
/**
1616
* @param int $argument

src/Exception/MissingCoversAnnotationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
/**
1414
* Exception that is raised when @covers must be used but is not.
1515
*/
16-
class MissingCoversAnnotationException extends RuntimeException
16+
final class MissingCoversAnnotationException extends RuntimeException
1717
{
1818
}

src/Exception/UnintentionallyCoveredCodeException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Exception that is raised when code is unintentionally covered.
1515
*/
16-
class UnintentionallyCoveredCodeException extends RuntimeException
16+
final class UnintentionallyCoveredCodeException extends RuntimeException
1717
{
1818
/**
1919
* @var array

src/Filter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Filter for whitelisting of code coverage information.
1515
*/
16-
class Filter
16+
final class Filter
1717
{
1818
/**
1919
* Source files that are whitelisted.

src/Node/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
use SebastianBergmann\CodeCoverage\CodeCoverage;
1414

15-
class Builder
15+
final class Builder
1616
{
1717
/**
1818
* @param CodeCoverage $coverage

0 commit comments

Comments
 (0)