• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

eliashaeussler / typo3-warming / 30127047120

24 Jul 2026 09:14PM UTC coverage: 93.78%. Remained the same
30127047120

push

github

web-flow
Merge pull request #1199 from eliashaeussler/task/cs

[TASK] Update to typo3/coding-standards 0.9.0

30 of 31 new or added lines in 16 files covered. (96.77%)

1734 of 1849 relevant lines covered (93.78%)

13.02 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

71.43
/Classes/ValueObject/Modal/SiteGroup.php
1
<?php
2

3
declare(strict_types=1);
4

5
/*
6
 * This file is part of the TYPO3 CMS extension "warming".
7
 *
8
 * Copyright (C) 2021-2026 Elias Häußler <elias@haeussler.dev>
9
 *
10
 * This program is free software: you can redistribute it and/or modify
11
 * it under the terms of the GNU General Public License as published by
12
 * the Free Software Foundation, either version 2 of the License, or
13
 * (at your option) any later version.
14
 *
15
 * This program is distributed in the hope that it will be useful,
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
 * GNU General Public License for more details.
19
 *
20
 * You should have received a copy of the GNU General Public License
21
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22
 */
23

24
namespace EliasHaeussler\Typo3Warming\ValueObject\Modal;
25

26
use TYPO3\CMS\Core;
27

28
/**
29
 * SiteGroup
30
 *
31
 * @author Elias Häußler <elias@haeussler.dev>
32
 * @license GPL-2.0-or-later
33
 */
34
final readonly class SiteGroup
35
{
36
    /**
37
     * @param list<SiteGroupItem> $items
38
     */
39
    public function __construct(
14✔
40
        private Core\Site\Entity\Site $site,
41
        private string $title,
42
        private string $iconIdentifier,
43
        private array $items,
44
    ) {}
14✔
45

46
    public function getSite(): Core\Site\Entity\Site
14✔
47
    {
48
        return $this->site;
14✔
49
    }
50

51
    public function getTitle(): string
14✔
52
    {
53
        return $this->title;
14✔
54
    }
55

56
    public function getIconIdentifier(): string
14✔
57
    {
58
        return $this->iconIdentifier;
14✔
59
    }
60

61
    /**
62
     * @return list<SiteGroupItem>
63
     */
64
    public function getItems(): array
14✔
65
    {
66
        return $this->items;
14✔
67
    }
68

69
    public function hasOnlyDefaultLanguage(): bool
×
70
    {
NEW
71
        if (count($this->items) > 1) {
×
72
            return false;
×
73
        }
74

75
        foreach ($this->items as $item) {
×
76
            return $item->isDefaultLanguage();
×
77
        }
78

79
        return false;
×
80
    }
81

82
    public function isMissing(): bool
14✔
83
    {
84
        foreach ($this->items as $item) {
14✔
85
            if (!$item->isMissing()) {
14✔
86
                return false;
14✔
87
            }
88
        }
89

90
        return true;
10✔
91
    }
92
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc