Skip to content

Commit

Permalink
Merge pull request #77 from Yoast/feature/qa-use-final-classes
Browse files Browse the repository at this point in the history
QA: make most classes `final`
  • Loading branch information
jrfnl authored Jun 15, 2022
2 parents 998c1f4 + a7b4cfc commit a6e9d5b
Show file tree
Hide file tree
Showing 33 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion phpunitpolyfills-autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* Custom autoloader.
*/
class Autoload {
final class Autoload {

/**
* Version number.
Expand Down
2 changes: 1 addition & 1 deletion tests/Helpers/AssertAttributesHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @covers \Yoast\PHPUnitPolyfills\Helpers\AssertAttributeHelper
*/
class AssertAttributesHelperTest extends TestCase {
final class AssertAttributesHelperTest extends TestCase {

/**
* Instance of the ClassWithProperties class.
Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertClosedResourceBzip2Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* @requires extension bz2
*/
class AssertClosedResourceBzip2Test extends AssertClosedResourceTestCase {
final class AssertClosedResourceBzip2Test extends AssertClosedResourceTestCase {

use AssertClosedResource;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertClosedResourceCurlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @requires extension curl
* @requires PHP < 8.0
*/
class AssertClosedResourceCurlTest extends AssertClosedResourceTestCase {
final class AssertClosedResourceCurlTest extends AssertClosedResourceTestCase {

use AssertClosedResource;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertClosedResourceDirTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @covers \Yoast\PHPUnitPolyfills\Helpers\ResourceHelper
* @covers \Yoast\PHPUnitPolyfills\Polyfills\AssertClosedResource
*/
class AssertClosedResourceDirTest extends AssertClosedResourceTestCase {
final class AssertClosedResourceDirTest extends AssertClosedResourceTestCase {

use AssertClosedResource;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertClosedResourceEnchantTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @phpcs:disable Generic.PHP.DeprecatedFunctions.Deprecated
* @phpcs:disable PHPCompatibility.FunctionUse.RemovedFunctions.enchant_broker_freeDeprecated
*/
class AssertClosedResourceEnchantTest extends AssertClosedResourceTestCase {
final class AssertClosedResourceEnchantTest extends AssertClosedResourceTestCase {

use AssertClosedResource;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertClosedResourceFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @covers \Yoast\PHPUnitPolyfills\Helpers\ResourceHelper
* @covers \Yoast\PHPUnitPolyfills\Polyfills\AssertClosedResource
*/
class AssertClosedResourceFileTest extends AssertClosedResourceTestCase {
final class AssertClosedResourceFileTest extends AssertClosedResourceTestCase {

use AssertClosedResource;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertClosedResourceFinfoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @requires extension finfo
* @requires PHP < 8.1
*/
class AssertClosedResourceFinfoTest extends AssertClosedResourceTestCase {
final class AssertClosedResourceFinfoTest extends AssertClosedResourceTestCase {

use AssertClosedResource;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertClosedResourceGdTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @requires extension gd
* @requires PHP < 8.0
*/
class AssertClosedResourceGdTest extends AssertClosedResourceTestCase {
final class AssertClosedResourceGdTest extends AssertClosedResourceTestCase {

use AssertClosedResource;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertClosedResourceNotResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @covers \Yoast\PHPUnitPolyfills\Helpers\ResourceHelper
* @covers \Yoast\PHPUnitPolyfills\Polyfills\AssertClosedResource
*/
class AssertClosedResourceNotResourceTest extends TestCase {
final class AssertClosedResourceNotResourceTest extends TestCase {

use AssertClosedResource;
use ExpectException; // Needed for PHPUnit < 5.2.0 support.
Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertClosedResourceProcessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @covers \Yoast\PHPUnitPolyfills\Helpers\ResourceHelper
* @covers \Yoast\PHPUnitPolyfills\Polyfills\AssertClosedResource
*/
class AssertClosedResourceProcessTest extends AssertClosedResourceTestCase {
final class AssertClosedResourceProcessTest extends AssertClosedResourceTestCase {

use AssertClosedResource;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertClosedResourceShmopTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @phpcs:disable Generic.PHP.DeprecatedFunctions.Deprecated
* @phpcs:disable PHPCompatibility.FunctionUse.RemovedFunctions.shmop_closeDeprecated
*/
class AssertClosedResourceShmopTest extends AssertClosedResourceTestCase {
final class AssertClosedResourceShmopTest extends AssertClosedResourceTestCase {

use AssertClosedResource;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertClosedResourceWddxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @phpcs:disable PHPCompatibility.FunctionUse.RemovedFunctions.wddx_packet_startRemoved
* @phpcs:disable PHPCompatibility.FunctionUse.RemovedFunctions.wddx_packet_endRemoved
*/
class AssertClosedResourceWddxTest extends AssertClosedResourceTestCase {
final class AssertClosedResourceWddxTest extends AssertClosedResourceTestCase {

use AssertClosedResource;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertClosedResourceXmlParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @requires extension libxml
* @requires PHP < 8.0
*/
class AssertClosedResourceXmlParserTest extends AssertClosedResourceTestCase {
final class AssertClosedResourceXmlParserTest extends AssertClosedResourceTestCase {

use AssertClosedResource;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertClosedResourceZipTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @phpcs:disable PHPCompatibility.FunctionUse.RemovedFunctions.zip_closeDeprecated
* @phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged
*/
class AssertClosedResourceZipTest extends AssertClosedResourceTestCase {
final class AssertClosedResourceZipTest extends AssertClosedResourceTestCase {

use AssertClosedResource;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertClosedResourceZlibTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* @requires extension zlib
*/
class AssertClosedResourceZlibTest extends AssertClosedResourceTestCase {
final class AssertClosedResourceZlibTest extends AssertClosedResourceTestCase {

use AssertClosedResource;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertEqualsSpecializationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @covers \Yoast\PHPUnitPolyfills\Polyfills\AssertEqualsSpecializations
*/
class AssertEqualsSpecializationsTest extends TestCase {
final class AssertEqualsSpecializationsTest extends TestCase {

use AssertEqualsSpecializations;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertFileDirectoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* @covers \Yoast\PHPUnitPolyfills\Polyfills\AssertFileDirectory
*/
class AssertFileDirectoryTest extends TestCase {
final class AssertFileDirectoryTest extends TestCase {

use AssertFileDirectory;
use AssertionRenames;
Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertFileEqualsSpecializationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @covers \Yoast\PHPUnitPolyfills\Polyfills\AssertFileEqualsSpecializations
*/
class AssertFileEqualsSpecializationsTest extends TestCase {
final class AssertFileEqualsSpecializationsTest extends TestCase {

use AssertFileEqualsSpecializations;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertIsTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* @covers \Yoast\PHPUnitPolyfills\Polyfills\AssertIsType
*/
class AssertIsTypeTest extends TestCase {
final class AssertIsTypeTest extends TestCase {

use AssertIsType;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertNumericTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @covers \Yoast\PHPUnitPolyfills\Polyfills\AssertNumericType
*/
class AssertNumericTypeTest extends TestCase {
final class AssertNumericTypeTest extends TestCase {

use AssertNumericType;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertObjectEqualsPHPUnitLt940Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @covers \Yoast\PHPUnitPolyfills\Polyfills\AssertObjectEquals
*/
class AssertObjectEqualsPHPUnitLt940Test extends TestCase {
final class AssertObjectEqualsPHPUnitLt940Test extends TestCase {

use AssertObjectEquals;
use ExpectException; // Needed for PHPUnit < 5.2.0 support.
Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertObjectEqualsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @requires PHP 7.0
*/
class AssertObjectEqualsTest extends TestCase {
final class AssertObjectEqualsTest extends TestCase {

use AssertObjectEquals;
use ExpectException; // Needed for PHPUnit < 5.2.0 support.
Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertStringContainsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* @covers \Yoast\PHPUnitPolyfills\Polyfills\AssertStringContains
*/
class AssertStringContainsTest extends TestCase {
final class AssertStringContainsTest extends TestCase {

use AssertStringContains;
use ExpectException; // Needed for PHPUnit < 5.2.0 support.
Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertionRenamesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* @covers \Yoast\PHPUnitPolyfills\Polyfills\AssertionRenames
*/
class AssertionRenamesTest extends TestCase {
final class AssertionRenamesTest extends TestCase {

use AssertFileDirectory; // Needed for PHPUnit < 5.6.0 support.
use AssertionRenames;
Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/EqualToSpecializationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @covers \Yoast\PHPUnitPolyfills\Polyfills\EqualToSpecializations
*/
class EqualToSpecializationsTest extends TestCase {
final class EqualToSpecializationsTest extends TestCase {

use EqualToSpecializations;

Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/ExpectExceptionMessageMatchesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* @covers \Yoast\PHPUnitPolyfills\Polyfills\ExpectExceptionMessageMatches
*/
class ExpectExceptionMessageMatchesTest extends TestCase {
final class ExpectExceptionMessageMatchesTest extends TestCase {

use ExpectException; // Needed for PHPUnit < 5.2.0 support.
use ExpectExceptionMessageMatches;
Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/ExpectExceptionObjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* @covers \Yoast\PHPUnitPolyfills\Polyfills\ExpectExceptionObject
*/
class ExpectExceptionObjectTest extends TestCase {
final class ExpectExceptionObjectTest extends TestCase {

use ExpectException; // Needed for PHPUnit < 5.2.0 support.
use ExpectExceptionObject;
Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/ExpectExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* @covers \Yoast\PHPUnitPolyfills\Polyfills\ExpectException
*/
class ExpectExceptionTest extends TestCase {
final class ExpectExceptionTest extends TestCase {

use AssertionRenames;
use ExpectException;
Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/ExpectPHPExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* @covers \Yoast\PHPUnitPolyfills\Polyfills\ExpectPHPException
*/
class ExpectPHPExceptionTest extends TestCase {
final class ExpectPHPExceptionTest extends TestCase {

use ExpectException; // Needed for PHPUnit < 5.2.0 support.
use ExpectPHPException;
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCases/TestCaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @covers \Yoast\PHPUnitPolyfills\TestCases\TestCase
*/
class TestCaseTest extends TestCase {
final class TestCaseTest extends TestCase {

use TestCaseTestTrait;

Expand Down
2 changes: 1 addition & 1 deletion tests/TestCases/XTestCaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @covers \Yoast\PHPUnitPolyfills\TestCases\XTestCase
*/
class XTestCaseTest extends XTestCase {
final class XTestCaseTest extends XTestCase {

use TestCaseTestTrait;

Expand Down
2 changes: 1 addition & 1 deletion tests/TestListeners/TestListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @covers \Yoast\PHPUnitPolyfills\TestListeners\TestListenerDefaultImplementation
* @covers \Yoast\PHPUnitPolyfills\TestListeners\TestListenerSnakeCaseMethods
*/
class TestListenerTest extends TestCase {
final class TestListenerTest extends TestCase {

/**
* The current test result instance.
Expand Down

0 comments on commit a6e9d5b

Please sign in to comment.