Skip to content

Commit

Permalink
Fix: Add property type declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Jan 7, 2025
1 parent beb706f commit 5053913
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 25 deletions.
7 changes: 2 additions & 5 deletions src/Construct.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@

final class Construct
{
/**
* @var string
*/
private $name;
private string $name;

/**
* @var list<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 list<Construct>
*/
private $constructs = [];
private array $constructs = [];

/**
* Returns a new exception from constructs.
Expand Down
19 changes: 4 additions & 15 deletions test/Util/Scenario.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,14 @@

final class Scenario
{
/**
* @var string
*/
private $description;

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

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

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

private function __construct(
string $description,
Expand Down

0 comments on commit 5053913

Please sign in to comment.