Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
Point
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 __toString
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace PeServer\Core\Image;
6
7use Stringable;
8use PeServer\Core\Code;
9
10/**
11 * 座標。
12 */
13readonly class Point implements Stringable
14{
15    /**
16     * 生成
17     *
18     * @param int $x X座標。
19     * @param int $y Y座標。
20     */
21    public function __construct(
22        public readonly int $x,
23        public readonly int $y
24    ) {
25    }
26
27    #region Stringable
28
29    public function __toString(): string
30    {
31        return Code::toString($this, ['x', 'y']);
32    }
33
34    #endregion
35}