Skip to content

Commit

Permalink
cs-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Oct 19, 2023
1 parent 7761939 commit efb86f8
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 15 deletions.
5 changes: 1 addition & 4 deletions src/Psalm/Storage/Assertion/HasArrayKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@
*/
final class HasArrayKey extends Assertion
{
public $key;

public function __construct(string $key)
public function __construct(public readonly string $key)
{
$this->key = $key;
}

public function getNegation(): Assertion
Expand Down
5 changes: 1 addition & 4 deletions src/Psalm/Storage/Assertion/IsNotCountable.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@
*/
final class IsNotCountable extends Assertion
{
public $is_negatable;

public function __construct(bool $is_negatable)
public function __construct(public readonly bool $is_negatable)
{
$this->is_negatable = $is_negatable;
}

public function isNegation(): bool
Expand Down
5 changes: 1 addition & 4 deletions src/Psalm/Storage/Assertion/NonEmptyCountable.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@
*/
final class NonEmptyCountable extends Assertion
{
public $is_negatable;

public function __construct(bool $is_negatable)
public function __construct(public readonly bool $is_negatable)
{
$this->is_negatable = $is_negatable;
}

public function getNegation(): Assertion
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Storage/PropertyStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class PropertyStorage implements HasAttributesInterface
/**
* @var ClassLikeAnalyzer::VISIBILITY_*
*/
public $visibility = ClassLikeAnalyzer::VISIBILITY_PUBLIC;
public int $visibility = ClassLikeAnalyzer::VISIBILITY_PUBLIC;

public ?CodeLocation $location = null;

Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Type/Atomic/TPropertiesOf.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ final class TPropertiesOf extends Atomic
/**
* @var self::VISIBILITY_*|null
*/
public $visibility_filter;
public ?int $visibility_filter;

/**
* @return list<TokenName>
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Type/Atomic/TTemplatePropertiesOf.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final class TTemplatePropertiesOf extends Atomic
/**
* @var TPropertiesOf::VISIBILITY_*|null
*/
public $visibility_filter;
public ?int $visibility_filter;

/**
* @param TPropertiesOf::VISIBILITY_*|null $visibility_filter
Expand Down

0 comments on commit efb86f8

Please sign in to comment.