1 | <?php |
||
26 | class GitConfig extends AbstractSource |
||
27 | { |
||
28 | use PreloadTrait; |
||
29 | |||
30 | /** |
||
31 | * Get all variables |
||
32 | * |
||
33 | * @return array |
||
34 | * @throws RuntimeException |
||
35 | */ |
||
36 | 2 | protected function preload(): array |
|
47 | |||
48 | /** |
||
49 | * @return array |
||
50 | */ |
||
51 | 2 | private function getVarsAssociations(): array |
|
58 | |||
59 | /** |
||
60 | * Get git config |
||
61 | * |
||
62 | * @return array |
||
63 | * @throws \Gennadyx\Skeleton\Exception\RuntimeException |
||
64 | */ |
||
65 | 2 | private function getConfig(): array |
|
82 | |||
83 | /** |
||
84 | * Get git binary for exec |
||
85 | * |
||
86 | * @return string |
||
87 | */ |
||
88 | 2 | private function findExecutable(): string |
|
95 | |||
96 | /** |
||
97 | * Execute git config command |
||
98 | * |
||
99 | * @param string $gitBin |
||
100 | * |
||
101 | * @return Process |
||
102 | * @throws \Symfony\Component\Process\Exception\LogicException |
||
103 | * @throws \Symfony\Component\Process\Exception\RuntimeException |
||
104 | */ |
||
105 | 2 | private function executeGitConfig(string $gitBin): Process |
|
112 | |||
113 | /** |
||
114 | * @param string $output |
||
115 | * |
||
116 | * @return array |
||
117 | */ |
||
118 | 2 | private function parseOutput(string $output): array |
|
132 | } |
||
133 |