Skip to content

Commit

Permalink
Merge pull request #493 from ergebnis/feature/php74
Browse files Browse the repository at this point in the history
Enhancement: Use `Php74` rule set
  • Loading branch information
localheinz authored Dec 30, 2021
2 parents 52d2f3a + d214c6e commit 2ba59ad
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

$license->save();

$config = PhpCsFixer\Config\Factory::fromRuleSet(new PhpCsFixer\Config\RuleSet\Php73($license->header()));
$config = PhpCsFixer\Config\Factory::fromRuleSet(new PhpCsFixer\Config\RuleSet\Php74($license->header()));

$config->getFinder()
->exclude([
Expand Down
7 changes: 2 additions & 5 deletions src/Construct.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,12 @@
*/
final class Construct
{
/**
* @var string
*/
private $name;
private string $name;

/**
* @var array<int, string>
*/
private $fileNames = [];
private array $fileNames = [];

private function __construct(string $name)
{
Expand Down
5 changes: 1 addition & 4 deletions src/Exception/DirectoryDoesNotExist.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

final class DirectoryDoesNotExist extends \InvalidArgumentException implements ExceptionInterface
{
/**
* @var string
*/
private $directory;
private string $directory;

/**
* Returns a new exception from a directory.
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/MultipleDefinitionsFound.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final class MultipleDefinitionsFound extends \RuntimeException implements Except
/**
* @var array<int, Construct>
*/
private $constructs;
private array $constructs;

/**
* Returns a new exception from constructs.
Expand Down
5 changes: 1 addition & 4 deletions test/Unit/ConstructsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@
*/
final class ConstructsTest extends Framework\TestCase
{
/**
* @var string
*/
private $fileWithParseError = __DIR__ . '/../Fixture/ParseError/MessedUp.php';
private string $fileWithParseError = __DIR__ . '/../Fixture/ParseError/MessedUp.php';

protected function setUp(): void
{
Expand Down
5 changes: 1 addition & 4 deletions test/Util/PhpVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
*/
final class PhpVersion
{
/**
* @var int
*/
private $value;
private int $value;

private function __construct(int $value)
{
Expand Down
25 changes: 5 additions & 20 deletions test/Util/Scenario.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,15 @@
*/
final class Scenario
{
/**
* @var PhpVersion
*/
private $phpVersion;

/**
* @var string
*/
private $description;

/**
* @var string
*/
private $fileName;

/**
* @var string
*/
private $fileContent;
private PhpVersion $phpVersion;
private string $description;
private string $fileName;
private string $fileContent;

/**
* @var array<int, Classy\Construct>
*/
private $constructs;
private array $constructs;

private function __construct(
PhpVersion $phpVersion,
Expand Down

0 comments on commit 2ba59ad

Please sign in to comment.