Skip to content

Commit

Permalink
Merge branch 'php-8.0/generic-lowercasetype-add-tests-constr-prop-pro…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Mar 16, 2021
2 parents c7f7013 + 805723a commit dc59530
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Standards/Generic/Tests/PHP/LowerCaseTypeUnitTest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,11 @@ class TypedProperties
private ClassName|/*comment*/Float|STRING|False $unionTypeC;
public sTRing | aRRaY | FaLSe $unionTypeD;
}

class ConstructorPropertyPromotionWithTypes {
public function __construct(protected Float|Int $x, public ?STRING &$y = 'test', private mixed $z) {}
}

class ConstructorPropertyPromotionAndNormalParams {
public function __construct(public Int $promotedProp, ?Int $normalArg) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,11 @@ class TypedProperties
private ClassName|/*comment*/float|string|false $unionTypeC;
public string | array | false $unionTypeD;
}

class ConstructorPropertyPromotionWithTypes {
public function __construct(protected float|int $x, public ?string &$y = 'test', private mixed $z) {}
}

class ConstructorPropertyPromotionAndNormalParams {
public function __construct(public int $promotedProp, ?int $normalArg) {}
}
2 changes: 2 additions & 0 deletions src/Standards/Generic/Tests/PHP/LowerCaseTypeUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ public function getErrorList()
72 => 2,
73 => 3,
74 => 3,
78 => 3,
82 => 2,
];

}//end getErrorList()
Expand Down

0 comments on commit dc59530

Please sign in to comment.