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

FluidTYPO3 / flux / 15918415903

20 May 2025 10:36AM UTC coverage: 91.109% (-2.1%) from 93.21%
15918415903

push

github

NamelessCoder
[TASK] Lock phpstan version

6927 of 7603 relevant lines covered (91.11%)

9.53 hits per line

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

84.62
/Classes/Integration/FormEngine/SelectOption.php
1
<?php
2
namespace FluidTYPO3\Flux\Integration\FormEngine;
3

4
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
5

6
class SelectOption
7
{
8
    private bool $namedKeys;
9
    private string $label;
10
    private ?string $icon;
11

12
    /**
13
     * @var mixed
14
     */
15
    private $value;
16

17
    /**
18
     * @param string|int|float|null $value
19
     */
20
    public function __construct(string $label, $value, ?string $icon = null)
21
    {
22
        $this->label = $label;
15✔
23
        $this->value = $value;
15✔
24
        $this->icon = $icon;
15✔
25
        $this->namedKeys = version_compare(VersionNumberUtility::getCurrentTypo3Version(), '12.3', '>=');
15✔
26
    }
27

28
    public function toArray(): array
29
    {
30
        $option = [
15✔
31
            'label' => $this->label,
15✔
32
            'value' => $this->value,
15✔
33
        ];
15✔
34
        if ($this->icon !== null) {
15✔
35
            $option['icon'] = null;
×
36
        }
37
        if (!$this->namedKeys) {
15✔
38
            return array_values($option);
15✔
39
        }
40
        return $option;
×
41
    }
42
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc