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

JBZoo / CI-Report-Converter / 7520440609

14 Oct 2023 08:18PM UTC coverage: 94.375%. Remained the same
7520440609

push

github

web-flow
PHP CS Fixer - `ordered_types` (#40)

1426 of 1511 relevant lines covered (94.37%)

28.38 hits per line

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

0.0
/src/Formats/TeamCity/Writers/CustomCallback.php
1
<?php
2

3
/**
4
 * JBZoo Toolbox - CI-Report-Converter.
5
 *
6
 * This file is part of the JBZoo Toolbox project.
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license    MIT
11
 * @copyright  Copyright (C) JBZoo.com, All rights reserved.
12
 * @see        https://github.com/JBZoo/CI-Report-Converter
13
 */
14

15
declare(strict_types=1);
16

17
namespace JBZoo\CIReportConverter\Formats\TeamCity\Writers;
18

19
final class CustomCallback implements AbstractWriter
20
{
21
    /** @var null|callable */
22
    private $callback;
23

24
    public function write(?string $message): void
25
    {
26
        if ($this->callback === null) {
×
27
            throw new Exception('Callback function is not set');
×
28
        }
29
        ($this->callback)($message);
×
30
    }
31

32
    /**
33
     * @param callable $callback $callback
34
     */
35
    public function setCallback(callable $callback): void
36
    {
37
        $this->callback = $callback;
×
38
    }
39
}
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

© 2025 Coveralls, Inc