1 | <?php |
||
19 | class ZohoSyncDatabaseCommand extends Command |
||
20 | { |
||
21 | /** |
||
22 | * The list of Zoho DAOs to copy. |
||
23 | * |
||
24 | * @var AbstractZohoDao[] |
||
25 | */ |
||
26 | private $zohoDaos; |
||
27 | |||
28 | /** |
||
29 | * @var ZohoDatabaseModelSync |
||
30 | */ |
||
31 | private $zohoDatabaseModelSync; |
||
32 | |||
33 | /** |
||
34 | * @var ZohoDatabaseCopier |
||
35 | */ |
||
36 | private $zohoDatabaseCopier; |
||
37 | |||
38 | /** |
||
39 | * @var ZohoDatabasePusher |
||
40 | */ |
||
41 | private $zohoDatabaseSync; |
||
42 | |||
43 | /** |
||
44 | * |
||
45 | * @var MultiLogger |
||
46 | */ |
||
47 | private $logger; |
||
48 | |||
49 | /** |
||
50 | * @var Lock |
||
51 | */ |
||
52 | private $lock; |
||
53 | |||
54 | /** |
||
55 | * The Zoho Dao and Beans generator |
||
56 | * |
||
57 | * @var EntitiesGeneratorService |
||
58 | */ |
||
59 | private $zohoEntitiesGenerator; |
||
60 | |||
61 | /** |
||
62 | * |
||
63 | * @var ZohoClient |
||
64 | */ |
||
65 | private $zohoClient; |
||
66 | |||
67 | private $pathZohoDaos; |
||
68 | |||
69 | private $namespaceZohoDaos; |
||
70 | |||
71 | /** |
||
72 | * |
||
73 | * @var Response |
||
74 | */ |
||
75 | private $usersResponse; |
||
76 | |||
77 | /** |
||
78 | * @var string[] |
||
79 | */ |
||
80 | private $excludedZohoDao; |
||
81 | |||
82 | |||
83 | /** |
||
84 | * @param ZohoDatabaseModelSync $zohoDatabaseModelSync |
||
85 | * @param ZohoDatabaseCopier $zohoDatabaseCopier |
||
86 | * @param ZohoDatabasePusher $zohoDatabaseSync |
||
87 | * @param EntitiesGeneratorService $zohoEntitiesGenerator The Zoho Dao and Beans generator |
||
88 | * @param ZohoClient $zohoClient |
||
89 | * @param string $pathZohoDaos Tht path where we need to generate the Daos. |
||
90 | * @param string $namespaceZohoDaos Daos namespace |
||
91 | * @param MultiLogger $logger |
||
92 | * @param Lock $lock A lock that can be used to avoid running the same command (copy) twice at the same time |
||
93 | * @param string[] $excludedZohoDao To exclude Dao and or solve Dao which can create ZohoResponse Error |
||
94 | */ |
||
95 | public function __construct(ZohoDatabaseModelSync $zohoDatabaseModelSync, ZohoDatabaseCopier $zohoDatabaseCopier, ZohoDatabasePusher $zohoDatabaseSync, |
||
111 | |||
112 | protected function configure() |
||
123 | |||
124 | protected function execute(InputInterface $input, OutputInterface $output) |
||
160 | |||
161 | /** |
||
162 | * Sychronizes the model of the database with Zoho records. |
||
163 | * |
||
164 | * @param OutputInterface $output |
||
165 | */ |
||
166 | private function syncModel(InputInterface $input, OutputInterface $output) |
||
177 | |||
178 | /** |
||
179 | * Sychronizes the model of the database with Zoho Users records. |
||
180 | * |
||
181 | * @param OutputInterface $output |
||
182 | */ |
||
183 | private function syncUserModel(OutputInterface $output) |
||
189 | |||
190 | /** |
||
191 | * Regerate Zoho Daos |
||
192 | * |
||
193 | * @param InputInterface $input |
||
|
|||
194 | * @param OutputInterface $output |
||
195 | */ |
||
196 | private function regenerateZohoDao(OutputInterface $output) |
||
213 | |||
214 | /** |
||
215 | * Run the fetch User Db command. |
||
216 | * |
||
217 | * @param InputInterface $input |
||
218 | * @param OutputInterface $output |
||
219 | */ |
||
220 | private function fetchUserDb(InputInterface $input, OutputInterface $output) |
||
226 | |||
227 | |||
228 | /** |
||
229 | * Run the fetch Db command. |
||
230 | * |
||
231 | * @param InputInterface $input |
||
232 | * @param OutputInterface $output |
||
233 | */ |
||
234 | private function fetchDb(InputInterface $input, OutputInterface $output) |
||
251 | |||
252 | /** |
||
253 | * Run the push Db command. |
||
254 | * |
||
255 | * @param OutputInterface $output |
||
256 | */ |
||
257 | private function pushDb(OutputInterface $output) |
||
267 | } |
||
268 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.