Conditions | 3 |
Paths | 5 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public static function runGitCommand(string $command): string |
||
27 | { |
||
28 | try { |
||
29 | $process = new Process($command, __DIR__); |
||
30 | if (0 === $process->run()) { |
||
31 | return trim($process->getOutput()); |
||
32 | } |
||
33 | |||
34 | throw new \RuntimeException( |
||
35 | sprintf( |
||
36 | 'The tag or commit hash could not be retrieved from "%s": %s', |
||
37 | __DIR__, |
||
38 | $process->getErrorOutput() |
||
39 | ) |
||
40 | ); |
||
41 | } catch (\RuntimeException $exception) { |
||
42 | throw new \RuntimeException('Process error'); |
||
43 | } |
||
44 | } |
||
45 | } |
||
46 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.