We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfee62d commit d7bf39bCopy full SHA for d7bf39b
Zend/tests/property_hooks/readonly_rfc_example_validation.phpt
@@ -5,10 +5,10 @@ Readonly property hook validation
5
6
readonly class PositivePoint
7
{
8
- public function __construct(
9
- public int $x { set => $value > 0 ? $value : throw new \Error('Value must be greater 0'); },
10
- public int $y { set => $value > 0 ? $value : throw new \Error('Value must be greater 0'); },
11
- ) {}
+ public function __construct(
+ public int $x { set => $value > 0 ? $value : throw new \Error('Value must be greater 0'); },
+ public int $y { set => $value > 0 ? $value : throw new \Error('Value must be greater 0'); },
+ ) {}
12
}
13
14
$one = new PositivePoint(1,1);
0 commit comments