Skip to content

Commit

Permalink
[TASK] Declare constants visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ohader committed Dec 9, 2024
1 parent 46709aa commit 9dd6e2e
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 31 deletions.
16 changes: 8 additions & 8 deletions src/Behavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

class Behavior implements Assertable
{
const COMMAND_DIR_OPENDIR = 'dir_opendir';
const COMMAND_MKDIR = 'mkdir';
const COMMAND_RENAME = 'rename';
const COMMAND_RMDIR = 'rmdir';
const COMMAND_STEAM_METADATA = 'stream_metadata';
const COMMAND_STREAM_OPEN = 'stream_open';
const COMMAND_UNLINK = 'unlink';
const COMMAND_URL_STAT = 'url_stat';
public const COMMAND_DIR_OPENDIR = 'dir_opendir';
public const COMMAND_MKDIR = 'mkdir';
public const COMMAND_RENAME = 'rename';
public const COMMAND_RMDIR = 'rmdir';
public const COMMAND_STEAM_METADATA = 'stream_metadata';
public const COMMAND_STREAM_OPEN = 'stream_open';
public const COMMAND_UNLINK = 'unlink';
public const COMMAND_URL_STAT = 'url_stat';

/**
* @var string[]
Expand Down
2 changes: 1 addition & 1 deletion src/PharStreamWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class PharStreamWrapper
* Internal stream constants that are not exposed to PHP, but used...
* @see https://github.com/php/php-src/blob/e17fc0d73c611ad0207cac8a4a01ded38251a7dc/main/php_streams.h
*/
const STREAM_OPEN_FOR_INCLUDE = 128;
public const STREAM_OPEN_FOR_INCLUDE = 128;

/**
* @var resource
Expand Down
6 changes: 3 additions & 3 deletions src/Resolver/PharInvocationCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

class PharInvocationCollection implements Collectable
{
const UNIQUE_INVOCATION = 1;
const UNIQUE_BASE_NAME = 2;
const DUPLICATE_ALIAS_WARNING = 32;
public const UNIQUE_INVOCATION = 1;
public const UNIQUE_BASE_NAME = 2;
public const DUPLICATE_ALIAS_WARNING = 32;

/**
* @var PharInvocation[]
Expand Down
6 changes: 3 additions & 3 deletions src/Resolver/PharInvocationResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

class PharInvocationResolver implements Resolvable
{
const RESOLVE_REALPATH = 1;
const RESOLVE_ALIAS = 2;
const ASSERT_INTERNAL_INVOCATION = 32;
public const RESOLVE_REALPATH = 1;
public const RESOLVE_ALIAS = 2;
public const ASSERT_INTERNAL_INVOCATION = 32;

/**
* @var string[]
Expand Down
3 changes: 0 additions & 3 deletions tests/Functional/Interceptor/AbstractTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ abstract class AbstractTestCase extends TestCase
*/
protected $deniedPaths = [];

/**
* @var int
*/
protected const EXPECTED_EXCEPTION_CODE = 0;

public function allowedPathsDataProvider(): array
Expand Down
3 changes: 0 additions & 3 deletions tests/Functional/Interceptor/ConjunctionInterceptorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ class ConjunctionInterceptorTest extends AbstractTestCase
__DIR__ . '/../Fixtures/compromised.phar.png/../bundle.phar',
];

/**
* @var int
*/
protected const EXPECTED_EXCEPTION_CODE = 1539625084;

protected function setUp(): void
Expand Down
3 changes: 0 additions & 3 deletions tests/Functional/Interceptor/PharExtensionInterceptorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ class PharExtensionInterceptorTest extends AbstractTestCase
__DIR__ . '/../Fixtures/compromised.phar.png/../bundle.phar',
];

/**
* @var int
*/
protected const EXPECTED_EXCEPTION_CODE = 1535198703;

protected function setUp(): void
Expand Down
3 changes: 0 additions & 3 deletions tests/Functional/Interceptor/PharMetaDataInterceptorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ class PharMetaDataInterceptorTest extends AbstractTestCase
__DIR__ . '/../Fixtures/compromised.phar/../bundle.phar',
];

/**
* @var int
*/
protected const EXPECTED_EXCEPTION_CODE = 1539632368;

protected function setUp(): void
Expand Down
8 changes: 4 additions & 4 deletions tests/Functional/Phar/ReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

class ReaderTest extends TestCase
{
const CONTAINER_ALIAS = 'container.alias';
const STUB_MAPPED_ALIAS = 'stub.mappedAlias';
const STUB_CONTENT_FLAG = 'stub.containerFlag';
const MANIFEST_ALIAS = 'manifest.alias';
private const CONTAINER_ALIAS = 'container.alias';
private const STUB_MAPPED_ALIAS = 'stub.mappedAlias';
private const STUB_CONTENT_FLAG = 'stub.containerFlag';
private const MANIFEST_ALIAS = 'manifest.alias';

public function pharAliasDataProvider(): array
{
Expand Down

0 comments on commit 9dd6e2e

Please sign in to comment.