Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize: add visibility for class constants #240

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@
<exclude name="WordPressVIPMinimum.Security.EscapingVoidReturnFunctions"/>
<exclude name="WordPressVIPMinimum.Security.ProperEscapingFunction"/>

<!-- Exclude select "modern PHP" sniffs, which conflict with the minimum supported PHP version of this package. -->
<exclude name="PSR12.Properties.ConstantVisibility"/><!-- PHP 7.1+. -->
<exclude name="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/><!-- PHP 7.1+. -->

<!-- As this repo is about providing assertions, "mixed" is a perfectly valid type. -->
<exclude name="SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint"/>
</rule>
Expand Down
2 changes: 1 addition & 1 deletion phpunitpolyfills-autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class Autoload {
*
* @var string
*/
const VERSION = '4.0.0-dev';
public const VERSION = '4.0.0-dev';

/**
* Loads a class.
Expand Down
10 changes: 5 additions & 5 deletions tests/Polyfills/AssertFileEqualsSpecializationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ final class AssertFileEqualsSpecializationsTest extends TestCase {

use AssertFileEqualsSpecializations;

const PATH_TO_EXPECTED = __DIR__ . '/Fixtures/AssertFileEqualsSpecialization_Expected.txt';
public const PATH_TO_EXPECTED = __DIR__ . '/Fixtures/AssertFileEqualsSpecialization_Expected.txt';

const PATH_TO_EQUALS = __DIR__ . '/Fixtures/AssertFileEqualsSpecialization_Equals.txt';
private const PATH_TO_EQUALS = __DIR__ . '/Fixtures/AssertFileEqualsSpecialization_Equals.txt';

const PATH_TO_NOT_EQUALS = __DIR__ . '/Fixtures/AssertFileEqualsSpecialization_NotEquals.txt';
private const PATH_TO_NOT_EQUALS = __DIR__ . '/Fixtures/AssertFileEqualsSpecialization_NotEquals.txt';

const PATH_TO_EQUALS_CI = __DIR__ . '/Fixtures/AssertFileEqualsSpecialization_EqualsCI.txt';
private const PATH_TO_EQUALS_CI = __DIR__ . '/Fixtures/AssertFileEqualsSpecialization_EqualsCI.txt';

const PATH_TO_NOT_EQUALS_CI = __DIR__ . '/Fixtures/AssertFileEqualsSpecialization_NotEqualsCI.txt';
private const PATH_TO_NOT_EQUALS_CI = __DIR__ . '/Fixtures/AssertFileEqualsSpecialization_NotEqualsCI.txt';

/**
* Verify availability of the assertFileEqualsCanonicalizing() method.
Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertObjectEqualsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ final class AssertObjectEqualsTest extends TestCase {
*
* @var string
*/
const COMPARATOR_EXCEPTION = InvalidComparisonMethodException::class;
private const COMPARATOR_EXCEPTION = InvalidComparisonMethodException::class;

/**
* Verify availability of the assertObjectEquals() method.
Expand Down
2 changes: 1 addition & 1 deletion tests/Polyfills/AssertObjectNotEqualsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ final class AssertObjectNotEqualsTest extends TestCase {
*
* @var string
*/
const COMPARATOR_EXCEPTION = InvalidComparisonMethodException::class;
private const COMPARATOR_EXCEPTION = InvalidComparisonMethodException::class;

/**
* Verify availability of the assertObjectNotEquals() method.
Expand Down
4 changes: 2 additions & 2 deletions tests/Polyfills/AssertionRenamesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ final class AssertionRenamesTest extends TestCase {

use AssertionRenames;

const NOT_EXISTENT_FILE = __DIR__ . \DIRECTORY_SEPARATOR . 'NotExisting.php';
private const NOT_EXISTENT_FILE = __DIR__ . \DIRECTORY_SEPARATOR . 'NotExisting.php';

const NOT_EXISTENT_DIR = __DIR__ . \DIRECTORY_SEPARATOR . 'NotExisting' . \DIRECTORY_SEPARATOR;
private const NOT_EXISTENT_DIR = __DIR__ . \DIRECTORY_SEPARATOR . 'NotExisting' . \DIRECTORY_SEPARATOR;

/**
* Verify availability of the assertIsNotReadable() method.
Expand Down
Loading