@@ -126,7 +126,6 @@ |
||
126 | 126 | |
127 | 127 | /** |
128 | 128 | * Run he sync Db command. |
129 | - * @param InputInterface $input |
|
130 | 129 | * @param OutputInterface $output |
131 | 130 | */ |
132 | 131 | private function syncDb(OutputInterface $output){ |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $this->zohoDatabaseModelSync = $zohoDatabaseModelSync; |
94 | 94 | $this->zohoDatabaseCopier = $zohoDatabaseCopier; |
95 | 95 | $this->zohoDatabaseSync = $zohoDatabaseSync; |
96 | - $this->zohoEntitiesGenerator = $zohoEntitiesGenerator; |
|
96 | + $this->zohoEntitiesGenerator = $zohoEntitiesGenerator; |
|
97 | 97 | $this->zohoClient = $zohoClient; |
98 | 98 | $this->pathZohoDaos = $pathZohoDaos; |
99 | 99 | $this->namespaceZohoDaos = $namespaceZohoDaos; |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | */ |
183 | 183 | private function getListFieldName(AbstractZohoDao $zohoDao) |
184 | 184 | { |
185 | - $fieldNames= array(); |
|
185 | + $fieldNames = array(); |
|
186 | 186 | foreach ($zohoDao->getFields() as $fieldsDescriptor) { |
187 | 187 | foreach (array_values($fieldsDescriptor) as $fieldDescriptor) { |
188 | 188 | $fieldNames[] = $fieldDescriptor['name']; |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use Psr\Log\LoggerInterface; |
8 | 8 | use Psr\Log\NullLogger; |
9 | 9 | use Wabel\Zoho\CRM\AbstractZohoDao; |
10 | -use Wabel\Zoho\CRM\Request\Response; |
|
11 | 10 | |
12 | 11 | /** |
13 | 12 | * This class is in charge of synchronizing one table MODEL with Zoho. |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | $flatFields = ZohoDatabaseHelper::getFlatFields($dao->getFields()); |
88 | 88 | $table->addColumn('uid', 'string', ['length' => 36]); |
89 | - $table->addColumn('id', 'string', ['length' => 100,'notnull'=>false]); |
|
89 | + $table->addColumn('id', 'string', ['length' => 100, 'notnull'=>false]); |
|
90 | 90 | $table->addUniqueIndex(['id']); |
91 | 91 | $table->setPrimaryKey(['uid']); |
92 | 92 | |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $table = $schema->createTable($tableName); |
195 | 195 | |
196 | 196 | $flatFields = $users->getUserFields(); |
197 | - $table->addColumn('id', 'string', ['length' => 100,'notnull'=>false]); |
|
197 | + $table->addColumn('id', 'string', ['length' => 100, 'notnull'=>false]); |
|
198 | 198 | $table->setPrimaryKey(['id']); |
199 | 199 | foreach ($flatFields as $field) { |
200 | 200 | if (in_array($field, ['id'])) { |
@@ -49,7 +49,7 @@ |
||
49 | 49 | $localDelete = $schema->createTable('local_delete'); |
50 | 50 | $localDelete->addColumn('table_name', 'string', ['length' => 100]); |
51 | 51 | $localDelete->addColumn('uid', 'string', ['length' => 36]); |
52 | - $localDelete->addColumn('id', 'string', ['length' => 100,'notnull'=>false]); |
|
52 | + $localDelete->addColumn('id', 'string', ['length' => 100, 'notnull'=>false]); |
|
53 | 53 | $localDelete->setPrimaryKey(array('table_name', 'uid')); |
54 | 54 | $localDelete->addUniqueIndex(['id', 'table_name']); |
55 | 55 |
@@ -122,13 +122,13 @@ |
||
122 | 122 | // ID not exist we can update the new row with the Zoho ID |
123 | 123 | $this->connection->beginTransaction(); |
124 | 124 | $this->connection->update($tableName, ['id' => $zohoBean->getZohoId()], ['uid' => $uid]); |
125 | - $this->connection->delete('local_insert', ['table_name'=>$tableName, 'uid' => $uid ]); |
|
125 | + $this->connection->delete('local_insert', ['table_name'=>$tableName, 'uid' => $uid]); |
|
126 | 126 | $this->connection->commit(); |
127 | 127 | } else { |
128 | 128 | //ID already exist we need to delete the duplicate row. |
129 | 129 | $this->connection->beginTransaction(); |
130 | - $this->connection->delete($tableName, ['uid' => $uid ]); |
|
131 | - $this->connection->delete('local_insert', ['table_name'=>$tableName, 'uid' => $uid ]); |
|
130 | + $this->connection->delete($tableName, ['uid' => $uid]); |
|
131 | + $this->connection->delete('local_insert', ['table_name'=>$tableName, 'uid' => $uid]); |
|
132 | 132 | $this->connection->commit(); |
133 | 133 | } |
134 | 134 | } |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use Psr\Log\LoggerInterface; |
8 | 8 | use Psr\Log\NullLogger; |
9 | 9 | use Wabel\Zoho\CRM\AbstractZohoDao; |
10 | -use Wabel\Zoho\CRM\Request\Response; |
|
11 | 10 | |
12 | 11 | /** |
13 | 12 | * This class is in charge of synchronizing one table MODEL with Zoho. |