Skip to content

Commit

Permalink
Change property visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
olivervogel committed Jun 2, 2024
1 parent 1be0aeb commit 7a0b80b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Rules/DataUri.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class DataUri extends AbstractRule
* @param null|array<string> $media_types
* @return void
*/
public function __construct(protected ?array $media_types = null)
public function __construct(private ?array $media_types = null)
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/Rules/Ean.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Ean extends AbstractRule
* @param array<int> $lengths
* @return void
*/
public function __construct(protected array $lengths = [8, 13])
public function __construct(private array $lengths = [8, 13])
{
}

Expand Down
3 changes: 2 additions & 1 deletion src/Rules/Gtin.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ class Gtin extends Ean
* @param array<int> $lengths
* @return void
*/
public function __construct(protected array $lengths = [8, 12, 13, 14])
public function __construct(private array $lengths = [8, 12, 13, 14])
{
parent::__construct($this->lengths);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/Rules/Isbn.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ class Isbn extends Ean
* @param array<int> $lengths
* @return void
*/
public function __construct(protected array $lengths = [10, 13])
public function __construct(private array $lengths = [10, 13])
{
parent::__construct($this->lengths);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Rules/Postalcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ class Postalcode extends AbstractRule implements DataAwareRule
*
* @var ?string
*/
protected ?string $reference;
private ?string $reference;

/**
* Data set used for validation
*
* @var array<string>
*/
protected array $data = [];
private array $data = [];

/**
* Create a new rule instance with allowed countrycodes
Expand Down

0 comments on commit 7a0b80b

Please sign in to comment.