1 | <?php |
||
25 | class GitHubDocsImport extends Command |
||
26 | { |
||
27 | /** |
||
28 | * The name and signature of the console command. |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $signature = 'docs:import'; |
||
32 | |||
33 | /** |
||
34 | * The console command description. |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $description = 'Import documentation from GitHub.'; |
||
38 | |||
39 | /** |
||
40 | * Execute the console command. |
||
41 | * @param GitHubDocsManager $manager |
||
42 | * @param GitHubConfigRepository $config |
||
43 | * @return void |
||
44 | * @throws \Github\Exception\ErrorException |
||
45 | * @throws \Github\Exception\InvalidArgumentException |
||
46 | * @throws \RuntimeException |
||
47 | */ |
||
48 | public function handle(GitHubDocsManager $manager, GitHubConfigRepository $config): void |
||
83 | |||
84 | /** |
||
85 | * @param string $org |
||
86 | * @param string $repo |
||
87 | * @param string $branch |
||
88 | * @return Collection |
||
89 | */ |
||
90 | private function getDocsCurrentState(string $org, string $repo, string $branch) |
||
98 | |||
99 | /** |
||
100 | * @param string $org |
||
101 | * @param string $repo |
||
102 | * @param string $branch |
||
103 | * @param string $file |
||
104 | * @return \Illuminate\Database\Eloquent\Model|Docs |
||
105 | */ |
||
106 | private function getDocsModel(string $org, string $repo, string $branch, string $file) |
||
116 | } |
||
117 |