Skip to content

Commit bea0670

Browse files
committed
DX: use constants for PHPUnit version
1 parent c990a13 commit bea0670

13 files changed

+27
-14
lines changed

src/RuleSet/Sets/PHPUnit30MigrationRiskySet.php

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

1313
namespace PhpCsFixer\RuleSet\Sets;
1414

15+
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
1516
use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
1617

1718
/**
@@ -23,7 +24,7 @@ public function getRules()
2324
{
2425
return [
2526
'php_unit_dedicate_assert' => [
26-
'target' => '3.0',
27+
'target' => PhpUnitTargetVersion::VERSION_3_0,
2728
],
2829
];
2930
}

src/RuleSet/Sets/PHPUnit32MigrationRiskySet.php

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

1313
namespace PhpCsFixer\RuleSet\Sets;
1414

15+
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
1516
use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
1617

1718
/**
@@ -24,7 +25,7 @@ public function getRules()
2425
return [
2526
'@PHPUnit30Migration:risky' => true,
2627
'php_unit_no_expectation_annotation' => [
27-
'target' => '3.2',
28+
'target' => PhpUnitTargetVersion::VERSION_3_2,
2829
],
2930
];
3031
}

src/RuleSet/Sets/PHPUnit35MigrationRiskySet.php

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

1313
namespace PhpCsFixer\RuleSet\Sets;
1414

15+
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
1516
use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
1617

1718
/**
@@ -24,7 +25,7 @@ public function getRules()
2425
return [
2526
'@PHPUnit32Migration:risky' => true,
2627
'php_unit_dedicate_assert' => [
27-
'target' => '3.5',
28+
'target' => PhpUnitTargetVersion::VERSION_3_5,
2829
],
2930
];
3031
}

src/RuleSet/Sets/PHPUnit43MigrationRiskySet.php

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

1313
namespace PhpCsFixer\RuleSet\Sets;
1414

15+
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
1516
use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
1617

1718
/**
@@ -24,7 +25,7 @@ public function getRules()
2425
return [
2526
'@PHPUnit35Migration:risky' => true,
2627
'php_unit_no_expectation_annotation' => [
27-
'target' => '4.3',
28+
'target' => PhpUnitTargetVersion::VERSION_4_3,
2829
],
2930
];
3031
}

src/RuleSet/Sets/PHPUnit48MigrationRiskySet.php

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

1313
namespace PhpCsFixer\RuleSet\Sets;
1414

15+
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
1516
use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
1617

1718
/**
@@ -24,7 +25,7 @@ public function getRules()
2425
return [
2526
'@PHPUnit43Migration:risky' => true,
2627
'php_unit_namespaced' => [
27-
'target' => '4.8',
28+
'target' => PhpUnitTargetVersion::VERSION_4_8,
2829
],
2930
];
3031
}

src/RuleSet/Sets/PHPUnit52MigrationRiskySet.php

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

1313
namespace PhpCsFixer\RuleSet\Sets;
1414

15+
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
1516
use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
1617

1718
/**
@@ -24,7 +25,7 @@ public function getRules()
2425
return [
2526
'@PHPUnit50Migration:risky' => true,
2627
'php_unit_expectation' => [
27-
'target' => '5.2',
28+
'target' => PhpUnitTargetVersion::VERSION_5_2,
2829
],
2930
];
3031
}

src/RuleSet/Sets/PHPUnit54MigrationRiskySet.php

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

1313
namespace PhpCsFixer\RuleSet\Sets;
1414

15+
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
1516
use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
1617

1718
/**
@@ -24,7 +25,7 @@ public function getRules()
2425
return [
2526
'@PHPUnit52Migration:risky' => true,
2627
'php_unit_mock' => [
27-
'target' => '5.4',
28+
'target' => PhpUnitTargetVersion::VERSION_5_4,
2829
],
2930
];
3031
}

src/RuleSet/Sets/PHPUnit55MigrationRiskySet.php

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

1313
namespace PhpCsFixer\RuleSet\Sets;
1414

15+
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
1516
use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
1617

1718
/**
@@ -24,7 +25,7 @@ public function getRules()
2425
return [
2526
'@PHPUnit54Migration:risky' => true,
2627
'php_unit_mock' => [
27-
'target' => '5.5',
28+
'target' => PhpUnitTargetVersion::VERSION_5_5,
2829
],
2930
];
3031
}

src/RuleSet/Sets/PHPUnit56MigrationRiskySet.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
namespace PhpCsFixer\RuleSet\Sets;
1414

15+
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
1516
use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
1617

1718
/**
@@ -24,10 +25,10 @@ public function getRules()
2425
return [
2526
'@PHPUnit55Migration:risky' => true,
2627
'php_unit_dedicate_assert' => [
27-
'target' => '5.6',
28+
'target' => PhpUnitTargetVersion::VERSION_5_6,
2829
],
2930
'php_unit_expectation' => [
30-
'target' => '5.6',
31+
'target' => PhpUnitTargetVersion::VERSION_5_6,
3132
],
3233
];
3334
}

src/RuleSet/Sets/PHPUnit57MigrationRiskySet.php

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

1313
namespace PhpCsFixer\RuleSet\Sets;
1414

15+
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
1516
use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
1617

1718
/**
@@ -24,7 +25,7 @@ public function getRules()
2425
return [
2526
'@PHPUnit56Migration:risky' => true,
2627
'php_unit_namespaced' => [
27-
'target' => '5.7',
28+
'target' => PhpUnitTargetVersion::VERSION_5_7,
2829
],
2930
];
3031
}

0 commit comments

Comments
 (0)