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

FluidTYPO3 / vhs / 30001290505

23 Jul 2026 10:57AM UTC coverage: 70.309% (-1.7%) from 72.022%
30001290505

push

github

NamelessCoder
[TER] 8.0.0

4819 of 6854 relevant lines covered (70.31%)

6.54 hits per line

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

60.0
/Classes/ViewHelpers/Math/SquareRootViewHelper.php
1
<?php
2
namespace FluidTYPO3\Vhs\ViewHelpers\Math;
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
/**
12
 * Math: SquareRoot
13
 *
14
 * Performs sqrt($a).
15
 */
16
class SquareRootViewHelper extends AbstractSingleMathViewHelper
17
{
18
    /**
19
     * @param integer|float|string|array $a
20
     * @return float|array
21
     */
22
    protected static function calculateAction($a, array $arguments = [])
23
    {
24
        if (static::assertIsArrayOrIterator($a)) {
3✔
25
            return array_map('sqrt', static::arrayFromArrayOrTraversableOrCSVStatic($a));
×
26
        }
27
        if (!is_scalar($a)) {
3✔
28
            return 0;
×
29
        }
30
        return sqrt((float) $a);
3✔
31
    }
32
}
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