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

php-coveralls / php-coveralls / 3826244124

pending completion
3826244124

push

github

Dariusz Ruminski
CS

1562 of 1648 relevant lines covered (94.78%)

10.32 hits per line

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

75.0
/src/Component/System/SystemCommandExecutor.php
1
<?php
2

3
namespace PhpCoveralls\Component\System;
4

5
/**
6
 * @author Kitamura Satoshi <with.no.parachute@gmail.com>
7
 * @author Dariusz RumiƄski <dariusz.ruminski@gmail.com>
8
 *
9
 * @internal
10
 */
11
final class SystemCommandExecutor implements SystemCommandExecutorInterface
12
{
13
    /**
14
     * Execute command.
15
     *
16
     * @param string $command
17
     *
18
     * @return array
19
     *
20
     * @throws \RuntimeException
21
     */
22
    public function execute($command)
23
    {
24
        exec($command, $result, $returnValue);
6✔
25

26
        if ($returnValue === 0) {
6✔
27
            return $result;
6✔
28
        }
29

30
        throw new \RuntimeException(sprintf('Failed to execute command: %s', $command), $returnValue);
×
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