Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
12.50% covered (danger)
12.50%
1 / 8
50.00% covered (danger)
50.00%
1 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
CollectionListMeta
12.50% covered (danger)
12.50%
1 / 8
50.00% covered (danger)
50.00%
1 / 2
4.68
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 array
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3declare(strict_types=1);
4
5namespace Cosray;
6
7final class CollectionListMeta
8{
9    public function __construct(
10        public bool $showPublished = true,
11        public bool $showLocked = false,
12        public bool $showHidden = false,
13        public bool $showChildren = false,
14        public bool $sortable = false,
15    ) {}
16
17    /** @return array<string, bool> */
18    public function array(): array
19    {
20        return [
21            'showPublished' => $this->showPublished,
22            'showLocked' => $this->showLocked,
23            'showHidden' => $this->showHidden,
24            'showChildren' => $this->showChildren,
25            'sortable' => $this->sortable,
26        ];
27    }
28}