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

CPS-IT / handlebars-forms / 22340200704

24 Feb 2026 07:00AM UTC coverage: 0.0%. Remained the same
22340200704

push

github

eliashaeussler
[TASK] Improve namings and extract RENDERABLES to its own value processor

0 of 129 new or added lines in 18 files covered. (0.0%)

3 existing lines in 2 files now uncovered.

0 of 458 relevant lines covered (0.0%)

0.0 hits per line

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

0.0
/Classes/DataProcessing/Value/ProcessingContext.php
1
<?php
2

3
declare(strict_types=1);
4

5
/*
6
 * This file is part of the TYPO3 CMS extension "handlebars_forms".
7
 *
8
 * It is free software; you can redistribute it and/or modify it under
9
 * the terms of the GNU General Public License, either version 2
10
 * of the License, or any later version.
11
 *
12
 * For the full copyright and license information, please read the
13
 * LICENSE.txt file that was distributed with this source code.
14
 *
15
 * The TYPO3 project - inspiring people to share!
16
 */
17

18
namespace CPSIT\Typo3HandlebarsForms\DataProcessing\Value;
19

20
use CPSIT\Typo3HandlebarsForms\DataProcessing;
21
use TYPO3\CMS\Form;
22

23
/**
24
 * ProcessingContext
25
 *
26
 * @author Elias Häußler <e.haeussler@familie-redlich.de>
27
 * @license GPL-2.0-or-later
28
 *
29
 * @implements \ArrayAccess<string, mixed>
30
 *
31
 * @phpstan-type ProcessorClosure \Closure(
32
 *     array<string, mixed>,
33
 *     Form\Domain\Model\Renderable\RootRenderableInterface|null,
34
 *     DataProcessing\Renderable\RenderableViewModel|null,
35
 * ): mixed
36
 */
37
final readonly class ProcessingContext implements \ArrayAccess
38
{
39
    /**
40
     * @param array<string, mixed> $configuration
41
     * @param ProcessorClosure|null $processRenderableClosure
42
     */
NEW
43
    public function __construct(
×
44
        public array $configuration = [],
45
        private ?\Closure $processRenderableClosure = null,
NEW
46
    ) {}
×
47

48
    /**
49
     * @param array<string, mixed> $configuration
50
     */
NEW
51
    public function process(
×
52
        array $configuration = [],
53
        ?Form\Domain\Model\Renderable\RootRenderableInterface $renderable = null,
54
        ?DataProcessing\Renderable\RenderableViewModel $viewModel = null,
55
    ): mixed {
NEW
56
        if ($this->processRenderableClosure === null) {
×
NEW
57
            return null;
×
58
        }
59

NEW
60
        return ($this->processRenderableClosure)($configuration, $renderable, $viewModel);
×
61
    }
62

NEW
63
    public function offsetExists(mixed $offset): bool
×
64
    {
NEW
65
        return \array_key_exists($offset, $this->configuration);
×
66
    }
67

NEW
68
    public function offsetGet(mixed $offset): mixed
×
69
    {
NEW
70
        return $this->configuration[$offset] ?? null;
×
71
    }
72

NEW
73
    public function offsetSet(mixed $offset, mixed $value): void
×
74
    {
75
        // Not allowed.
NEW
76
    }
×
77

NEW
78
    public function offsetUnset(mixed $offset): void
×
79
    {
80
        // Not allowed.
NEW
81
    }
×
82
}
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