1 | <?php |
||
24 | class Config extends Base |
||
25 | { |
||
26 | /** |
||
27 | * Does git have a configuration key |
||
28 | * |
||
29 | * @param string $name |
||
30 | * @return boolean |
||
31 | */ |
||
32 | 4 | public function has(string $name) : bool |
|
42 | |||
43 | /** |
||
44 | * Get a configuration key value |
||
45 | * |
||
46 | * @param string $name |
||
47 | * @return string |
||
48 | */ |
||
49 | 2 | public function get(string $name) : string |
|
55 | |||
56 | /** |
||
57 | * Get config values without throwing exceptions |
||
58 | * |
||
59 | * You can provide a default value to return. |
||
60 | * By default the return value on unset config values is the empty string. |
||
61 | * |
||
62 | * @param string $name Name of the config value to retrieve |
||
63 | * @param string $default Value to return if config value is not set, empty string by default |
||
64 | * @return string |
||
65 | */ |
||
66 | 2 | public function getSafely(string $name, string $default = '') |
|
70 | |||
71 | /** |
||
72 | * Run the get config command |
||
73 | * |
||
74 | * @param string $name |
||
75 | * @return \SebastianFeldmann\Cli\Command\Runner\Result |
||
76 | */ |
||
77 | 5 | private function configCommand(string $name) : Result |
|
86 | } |
||
87 |