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

FluidTYPO3 / vhs / 12968595783

25 Jan 2025 09:30PM UTC coverage: 72.268%. Remained the same
12968595783

Pull #1925

github

web-flow
Merge aa1eb976f into 0ca5a1c10
Pull Request #1925: [BUGFIX] Replace all evaluateCondition methods with verdict methods

19 of 27 new or added lines in 9 files covered. (70.37%)

25 existing lines in 4 files now uncovered.

5548 of 7677 relevant lines covered (72.27%)

13.46 hits per line

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

88.89
/Classes/ViewHelpers/Condition/String/IsLowercaseViewHelper.php
1
<?php
2
namespace FluidTYPO3\Vhs\ViewHelpers\Condition\String;
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 TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
12
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractConditionViewHelper;
13

14
/**
15
 * ### Condition: String is lowercase
16
 *
17
 * Condition ViewHelper which renders the `then` child if provided
18
 * string is lowercase. By default only the first letter is tested.
19
 * To test the full string set $fullString to TRUE.
20
 */
21
class IsLowercaseViewHelper extends AbstractConditionViewHelper
22
{
23
    public function initializeArguments(): void
24
    {
25
        parent::initializeArguments();
6✔
26
        $this->registerArgument('string', 'string', 'string to check', true);
6✔
27
        $this->registerArgument('fullString', 'string', 'need', false, false);
6✔
28
    }
29

30
    public static function verdict(array $arguments, RenderingContextInterface $renderingContext): bool
31
    {
32
        if (!is_array($arguments)) {
24✔
NEW
33
            return false;
×
34
        }
35
        if ($arguments['fullString']) {
24✔
36
            $result = ctype_lower($arguments['string']);
12✔
37
        } else {
38
            $result = ctype_lower(substr($arguments['string'], 0, 1));
12✔
39
        }
40
        return $result;
24✔
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