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

FluidTYPO3 / vhs / 28155672107

23 Jun 2026 01:13PM UTC coverage: 69.678% (-1.5%) from 71.202%
28155672107

push

github

NamelessCoder
[TASK] Homogenize ViewHelper return types

5 of 7 new or added lines in 4 files covered. (71.43%)

105 existing lines in 12 files now uncovered.

4798 of 6886 relevant lines covered (69.68%)

2.03 hits per line

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

86.96
/Classes/Traits/TagViewHelperCompatibility.php
1
<?php
2
namespace FluidTYPO3\Vhs\Traits;
3

4
/*
5
 * This file is part of the FluidTYPO3/Vhs project under GPLv2 or later.
6
 *
7
 * For the full copyright and license information, please read the
8
 * LICENSE.md file that was distributed with this source code.
9
 */
10

11
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
12

13
trait TagViewHelperCompatibility
14
{
15
    /**
16
     * Register a new tag attribute. Tag attributes are all arguments which will be directly appended to a tag if you
17
     * call $this->initializeTag()
18
     *
19
     * @param string $name Name of tag attribute
20
     * @param string $type Type of the tag attribute
21
     * @param string $description Description of tag attribute
22
     * @param bool $required set to true if tag attribute is required. Defaults to false.
23
     * @param mixed $defaultValue Optional, default value of attribute if one applies
24
     * @return void
25
     * @api
26
     */
27
    protected function registerTagAttribute($name, $type, $description, $required = false, $defaultValue = null)
28
    {
29
        if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '13.4', '>=')) {
14✔
UNCOV
30
            $this->registerArgument($name, $type, $description, $required, $defaultValue);
×
UNCOV
31
            return;
×
32
        }
33
        parent::registerTagAttribute($name, $type, $description, $required, $defaultValue);
14✔
34
    }
35

36
    /**
37
     * Registers all standard HTML universal attributes.
38
     * Should be used inside registerArguments();
39
     *
40
     * @return void
41
     * @api
42
     */
43
    protected function registerUniversalTagAttributes()
44
    {
45
        if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '13.4', '>=')) {
12✔
UNCOV
46
            return;
×
47
        }
48
        $this->registerTagAttribute('class', 'string', 'CSS class(es) for this element');
12✔
49
        $this->registerTagAttribute(
12✔
50
            'dir',
12✔
51
            'string',
12✔
52
            'Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)'
12✔
53
        );
12✔
54
        $this->registerTagAttribute('id', 'string', 'Unique (in this file) identifier for this HTML element.');
12✔
55
        $this->registerTagAttribute(
12✔
56
            'lang',
12✔
57
            'string',
12✔
58
            'Language for this element. Use short names specified in RFC 1766'
12✔
59
        );
12✔
60
        $this->registerTagAttribute('style', 'string', 'Individual CSS styles for this element');
12✔
61
        $this->registerTagAttribute('title', 'string', 'Tooltip text of element');
12✔
62
        $this->registerTagAttribute('accesskey', 'string', 'Keyboard shortcut to access this element');
12✔
63
        $this->registerTagAttribute('tabindex', 'integer', 'Specifies the tab order of this element');
12✔
64
        $this->registerTagAttribute('onclick', 'string', 'JavaScript evaluated for the onclick event');
12✔
65
    }
66
}
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