Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
PageShortcut
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
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
1<?php
2
3declare(strict_types=1);
4
5namespace PeServer\Core\Mvc;
6
7use PeServer\Core\Mvc\PageShortcutKind;
8
9/**
10 * ページャのショートカット。
11 */
12readonly class PageShortcut
13{
14    #region variable
15    #endregion
16
17    /**
18     * 生成。
19     *
20     * @param int $pageNumber ページ番号(1基点)。
21     * @phpstan-param positive-int $pageNumber
22     * @param bool $current 自身が現在選択ページか。
23     * @param bool $enabled 有効か。
24     * @param PageShortcutKind $kind ショートカット種別。HTML(CSS) としてそのまま使用可能。
25     */
26    public function __construct(
27        public int $pageNumber,
28        public bool $current,
29        public bool $enabled,
30        public PageShortcutKind $kind,
31    ) {
32    }
33}