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

Jagepard / Rudra-Cli / 15920986328

27 Jun 2025 07:42AM UTC coverage: 4.771% (-95.2%) from 100.0%
15920986328

push

github

web-flow
Merge pull request #29 from Jagepard/wip

adds commands

0 of 479 new or added lines in 20 files covered. (0.0%)

24 of 503 relevant lines covered (4.77%)

0.12 hits per line

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

0.0
/src/Command/ArrayToYml.php
1
<?php
2

3
namespace Rudra\Cli\Command;
4

5
use Exception;
6
use Symfony\Component\Yaml\Yaml;
7
use Rudra\Cli\Command\ConsoleFacade as Cli;
8

9
class ArrayToYml
10
{
NEW
11
    public function actionIndex(): void
×
12
    {
NEW
13
        Cli::printer("Put the file containing the array into the config directory" . PHP_EOL, "green");
×
NEW
14
        Cli::printer("Enter the name of the php file containing the array: ", "magneta");
×
NEW
15
        $filename = trim(fgets(fopen("php://stdin", "r")));
×
16

17
        try {
NEW
18
            $array = include("config/$filename.php");
×
NEW
19
            $yaml = Yaml::dump($array);
×
NEW
20
            file_put_contents("config/$filename.yml", $yaml);
×
21

NEW
22
            Cli::printer("✅ Yml was created" . PHP_EOL, "cyan", );
×
NEW
23
        } catch (Exception $e) {
×
NEW
24
            echo 'Exception: ',  $e->getMessage(), PHP_EOL;
×
25
        }
26
    }
27
}
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