1 | <?php |
||
15 | class CopyrightPrompt implements PromptInterface |
||
16 | { |
||
17 | /** |
||
18 | * Github Client |
||
19 | * @var Client |
||
20 | */ |
||
21 | private $github; |
||
22 | |||
23 | /** |
||
24 | * @var GitConfig |
||
25 | */ |
||
26 | private $gitConfig; |
||
27 | |||
28 | /** |
||
29 | * @param GitConfig $gitConfig |
||
30 | * @param Client $github |
||
31 | */ |
||
32 | 1 | public function __construct(GitConfig $gitConfig, Client $github) |
|
33 | { |
||
34 | 1 | $this->github = $github; |
|
35 | 1 | $this->gitConfig = $gitConfig; |
|
36 | 1 | } |
|
37 | |||
38 | /** |
||
39 | * @return GitConfig |
||
40 | */ |
||
41 | 1 | public function getGitConfig() |
|
45 | |||
46 | /** |
||
47 | * @return Client |
||
48 | */ |
||
49 | 1 | public function getGithub() |
|
53 | |||
54 | /** |
||
55 | * Get default values from different sources |
||
56 | * |
||
57 | * - github organization |
||
58 | * - github user |
||
59 | * - git user |
||
60 | * - file owner |
||
61 | * |
||
62 | * @return array |
||
63 | */ |
||
64 | 3 | public function getDefaults() |
|
96 | |||
97 | /** |
||
98 | * Prepend a string to all items in array |
||
99 | * |
||
100 | * @param string $prepend |
||
101 | * @param array $array |
||
102 | * @return array |
||
103 | */ |
||
104 | public function prependToArray($prepend, array $array) |
||
110 | |||
111 | /** |
||
112 | * @param OutputInterface $output |
||
113 | * @param DialogHelper $dialog |
||
114 | * @return array |
||
115 | */ |
||
116 | 1 | public function getValues(OutputInterface $output, DialogHelper $dialog) |
|
135 | } |
||
136 | |||
137 |