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

JBZoo / Mermaid-PHP / 6400427580

26 Sep 2023 07:15PM UTC coverage: 90.214% (+0.6%) from 89.606%
6400427580

push

github

web-flow
Add Timeline Diagram (#15)

48 of 48 new or added lines in 3 files covered. (100.0%)

295 of 327 relevant lines covered (90.21%)

45.3 hits per line

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

75.0
/src/Timeline/Event.php
1
<?php
2

3
/**
4
 * JBZoo Toolbox - Mermaid-PHP.
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/Mermaid-PHP
13
 */
14

15
declare(strict_types=1);
16

17
namespace JBZoo\MermaidPHP\Timeline;
18

19
use JBZoo\MermaidPHP\Helper;
20

21
class Event
22
{
23
    private static bool $safeMode   = false;
24
    protected string    $identifier = '';
25

26
    public function __construct(string $identifier)
27
    {
28
        $this->identifier = static::isSafeMode() ? Helper::getId($identifier) : $identifier;
16✔
29
    }
30

31
    public function __toString(): string
32
    {
33
        return "{$this->identifier}";
16✔
34
    }
35

36
    public function getId(): string
37
    {
38
        return $this->identifier;
×
39
    }
40

41
    public static function isSafeMode(): bool
42
    {
43
        return self::$safeMode;
16✔
44
    }
45
}
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