1 | <?php namespace Arcanedev\LaravelLang\Commands; |
||
11 | class CheckCommand extends AbstractCommand |
||
12 | { |
||
13 | /* ----------------------------------------------------------------- |
||
14 | | Properties |
||
15 | | ----------------------------------------------------------------- |
||
16 | */ |
||
17 | |||
18 | /** |
||
19 | * The name and signature of the console command. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $signature = 'trans:check'; |
||
24 | |||
25 | /** |
||
26 | * The console command description. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $description = 'Check the missing translations.'; |
||
31 | |||
32 | /** |
||
33 | * The TransChecker instance. |
||
34 | * |
||
35 | * @var \Arcanedev\LaravelLang\Contracts\TransChecker |
||
36 | */ |
||
37 | private $checker; |
||
38 | |||
39 | /** |
||
40 | * Missing translations count. |
||
41 | * |
||
42 | * @var int |
||
43 | */ |
||
44 | private $missingTranslations = 0; |
||
45 | |||
46 | /* ----------------------------------------------------------------- |
||
47 | | Constructor |
||
48 | | ----------------------------------------------------------------- |
||
49 | */ |
||
50 | |||
51 | /** |
||
52 | * Init the CheckCommand. |
||
53 | * |
||
54 | * @param \Arcanedev\LaravelLang\Contracts\TransChecker $checker |
||
55 | */ |
||
56 | 20 | public function __construct(TransChecker $checker) |
|
64 | |||
65 | /* ----------------------------------------------------------------- |
||
66 | | Main Methods |
||
67 | | ----------------------------------------------------------------- |
||
68 | */ |
||
69 | |||
70 | /** |
||
71 | * Execute the console command. |
||
72 | */ |
||
73 | 4 | public function handle() |
|
90 | |||
91 | /* ----------------------------------------------------------------- |
||
92 | | Other Methods |
||
93 | | ----------------------------------------------------------------- |
||
94 | */ |
||
95 | |||
96 | /** |
||
97 | * Prepare table rows. |
||
98 | * |
||
99 | * @param array $missing |
||
100 | 4 | * |
|
101 | * @return array |
||
102 | 4 | */ |
|
103 | private function prepareRows(array $missing) |
||
119 | |||
120 | /** |
||
121 | * Show the message. |
||
122 | * |
||
123 | * @codeCoverageIgnore |
||
124 | */ |
||
125 | private function showMessage() |
||
132 | |||
133 | /** |
||
134 | * Get the exit code. |
||
135 | * |
||
136 | * @return int |
||
137 | */ |
||
138 | protected function getExitCode() |
||
142 | |||
143 | /** |
||
144 | * Check if has missing translations. |
||
145 | * |
||
146 | * @return bool |
||
147 | */ |
||
148 | protected function hasMissingTranslations() |
||
152 | } |
||
153 |