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 3173381 commit 512331bCopy full SHA for 512331b
src/Types/Point.php
@@ -16,25 +16,10 @@
16
*/
17
class Point implements Jsonable, Arrayable
18
{
19
- public float $x = 0;
20
-
21
- public float $y = 0;
22
23
- /**
24
- * Point constructor.
25
- *
26
- * @param float $x
27
- * @param float $y
28
- */
29
- public function __construct(float $x = 0, float $y = 0)
+ public function __construct(public float $x = 0, public float $y = 0)
30
31
- $this->x = $x;
32
- $this->y = $y;
33
}
34
35
36
- * @return array
37
38
public function toArray(): array
39
40
return [
0 commit comments