• 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

37.5
/Classes/ViewHelpers/Math/SquareViewHelper.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: Square
13
 *
14
 * Performs $a ^ 2.
15
 */
16
class SquareViewHelper extends AbstractSingleMathViewHelper
17
{
18
    /**
19
     * @param integer|float|string|iterable|array $a
20
     * @return integer|float|array
21
     */
22
    protected static function calculateAction($a, array $arguments = [])
23
    {
24
        if (static::assertIsArrayOrIterator($a)) {
3✔
25
            return array_map(
×
26
                [static::class, 'calculateAction'],
×
27
                static::arrayFromArrayOrTraversableOrCSVStatic($a)
×
28
            );
×
29
        }
30
        if (!is_scalar($a)) {
3✔
31
            return 0;
×
32
        }
33
        /** @var numeric $a */
34
        return $a ** 2;
3✔
35
    }
36
}
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