Skip to content

Commit

Permalink
Use int<0, 1> instead of 0|1
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Dec 23, 2024
1 parent 5e117f8 commit 3299957
Show file tree
Hide file tree
Showing 38 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion src/Metadata/After.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private int $priority;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-negative-int $priority
*/
protected function __construct(int $level, int $priority)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/AfterClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private int $priority;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-negative-int $priority
*/
protected function __construct(int $level, int $priority)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/BackupGlobals.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
private bool $enabled;

/**
* @param 0|1 $level
* @param int<0, 1> $level
*/
protected function __construct(int $level, bool $enabled)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/BackupStaticProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
private bool $enabled;

/**
* @param 0|1 $level
* @param int<0, 1> $level
*/
protected function __construct(int $level, bool $enabled)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/Before.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private int $priority;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-negative-int $priority
*/
protected function __construct(int $level, int $priority)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/BeforeClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private int $priority;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-negative-int $priority
*/
protected function __construct(int $level, int $priority)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/CoversClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private string $className;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param class-string $className
*/
protected function __construct(int $level, string $className)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/CoversClassesThatExtendClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private string $className;

/**
* @param 0|1 $level
* @param int<0, 1> $level
*/
protected function __construct(int $level, string $className)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/CoversClassesThatImplementInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private string $interfaceName;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param class-string $interfaceName
*/
protected function __construct(int $level, string $interfaceName)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/CoversFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private string $functionName;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-empty-string $functionName
*/
protected function __construct(int $level, string $functionName)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/CoversMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
private string $methodName;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param class-string $className
* @param non-empty-string $methodName
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/CoversNamespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private string $namespace;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-empty-string $namespace
*/
protected function __construct(int $level, string $namespace)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/DataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
private string $methodName;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param class-string $className
* @param non-empty-string $methodName
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/DependsOnClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
private bool $shallowClone;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param class-string $className
*/
protected function __construct(int $level, string $className, bool $deepClone, bool $shallowClone)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/DependsOnMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
private bool $shallowClone;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param class-string $className
* @param non-empty-string $methodName
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/ExcludeGlobalVariableFromBackup.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private string $globalVariableName;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-empty-string $globalVariableName
*/
protected function __construct(int $level, string $globalVariableName)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/ExcludeStaticPropertyFromBackup.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
private string $propertyName;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param class-string $className
* @param non-empty-string $propertyName
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private string $groupName;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-empty-string $groupName
*/
protected function __construct(int $level, string $groupName)
Expand Down
4 changes: 2 additions & 2 deletions src/Metadata/Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
private const int METHOD_LEVEL = 1;

/**
* @var 0|1
* @var int<0, 1>
*/
private int $level;

Expand Down Expand Up @@ -527,7 +527,7 @@ public static function withoutErrorHandler(): WithoutErrorHandler
}

/**
* @param 0|1 $level
* @param int<0, 1> $level
*/
protected function __construct(int $level)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/PostCondition.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private int $priority;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-negative-int $priority
*/
protected function __construct(int $level, int $priority)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/PreCondition.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private int $priority;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-negative-int $priority
*/
protected function __construct(int $level, int $priority)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/PreserveGlobalState.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
private bool $enabled;

/**
* @param 0|1 $level
* @param int<0, 1> $level
*/
protected function __construct(int $level, bool $enabled)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/RequiresFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private string $functionName;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-empty-string $functionName
*/
protected function __construct(int $level, string $functionName)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/RequiresMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
private string $methodName;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param class-string $className
* @param non-empty-string $methodName
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/RequiresOperatingSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private string $operatingSystem;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-empty-string $operatingSystem
*/
public function __construct(int $level, string $operatingSystem)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/RequiresOperatingSystemFamily.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private string $operatingSystemFamily;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-empty-string $operatingSystemFamily
*/
protected function __construct(int $level, string $operatingSystemFamily)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/RequiresPhp.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
private Requirement $versionRequirement;

/**
* @param 0|1 $level
* @param int<0, 1> $level
*/
protected function __construct(int $level, Requirement $versionRequirement)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/RequiresPhpExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
private ?Requirement $versionRequirement;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-empty-string $extension
*/
protected function __construct(int $level, string $extension, ?Requirement $versionRequirement)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/RequiresPhpunit.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
private Requirement $versionRequirement;

/**
* @param 0|1 $level
* @param int<0, 1> $level
*/
protected function __construct(int $level, Requirement $versionRequirement)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/RequiresSetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
private string $value;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-empty-string $setting
* @param non-empty-string $value
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/TestDox.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private string $text;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-empty-string $text
*/
protected function __construct(int $level, string $text)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/TestWith.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
private ?string $name;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param array<array<mixed>> $data
* @param ?non-empty-string $name
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/UsesClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private string $className;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param class-string $className
*/
protected function __construct(int $level, string $className)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/UsesClassesThatExtendClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private string $className;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param class-string $className
*/
protected function __construct(int $level, string $className)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/UsesClassesThatImplementInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private string $interfaceName;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param class-string $interfaceName
*/
protected function __construct(int $level, string $interfaceName)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/UsesFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private string $functionName;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-empty-string $functionName
*/
public function __construct(int $level, string $functionName)
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/UsesMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
private string $methodName;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param class-string $className
* @param non-empty-string $methodName
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/UsesNamespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
private string $namespace;

/**
* @param 0|1 $level
* @param int<0, 1> $level
* @param non-empty-string $namespace
*/
protected function __construct(int $level, string $namespace)
Expand Down

0 comments on commit 3299957

Please sign in to comment.