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

JBZoo / Data / 7796885268

28 Jan 2024 08:47AM UTC coverage: 98.958%. Remained the same
7796885268

push

github

web-flow
Add PHP 8.3 support and update dependencies in composer.json (#31)

190 of 192 relevant lines covered (98.96%)

38.97 hits per line

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

100.0
/src/Yml.php
1
<?php
2

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

15
declare(strict_types=1);
16

17
namespace JBZoo\Data;
18

19
use Symfony\Component\Yaml\Yaml;
20

21
final class Yml extends AbstractData
22
{
23
    protected function encode(array $data): string
24
    {
25
        return Yaml::dump($data, 10, 2, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK | Yaml::DUMP_NULL_AS_TILDE);
24✔
26
    }
27

28
    protected function decode(string $string): mixed
29
    {
30
        return Yaml::parse($string);
30✔
31
    }
32
}
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