Completed
Push — 2.0 ( 7b6bcb...0ed566 )
by Raphaël
08:47
created
src/ZohoDatabaseHelper.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -16,6 +16,7 @@
 block discarded – undo
16 16
      * Computes the name of the table based on the DAO plural module name.
17 17
      *
18 18
      * @param AbstractZohoDao $dao
19
+     * @param string $prefix
19 20
      *
20 21
      * @return string
21 22
      */
Please login to merge, or discard this patch.
src/ZohoDatabaseCopier.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use Psr\Log\LoggerInterface;
7 7
 use Psr\Log\NullLogger;
8 8
 use Wabel\Zoho\CRM\AbstractZohoDao;
9
-use Wabel\Zoho\CRM\Request\Response;
10 9
 
11 10
 /**
12 11
  * This class is in charge of synchronizing one table of your database with Zoho records.
Please login to merge, or discard this patch.
src/ZohoDatabaseModelSync.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
 
87 87
         $flatFields = ZohoDatabaseHelper::getFlatFields($dao->getFields());
88 88
         //@Temporary fix to use Mysql5.7 not strict
89
-        $table->addColumn('uid', 'string', ['length' => 36,'notnull'=>false]);
90
-        $table->addColumn('id', 'string', ['length' => 100,'notnull'=>false]);
89
+        $table->addColumn('uid', 'string', ['length' => 36, 'notnull'=>false]);
90
+        $table->addColumn('id', 'string', ['length' => 100, 'notnull'=>false]);
91 91
         $table->addUniqueIndex(['id']);
92 92
         //@Temporary fix to use Mysql5.7 not strict
93 93
 //        $table->setPrimaryKey(['uid']);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         $table = $schema->createTable($tableName);
197 197
 
198 198
         $flatFields = $users->getUserFields();
199
-        $table->addColumn('id', 'string', ['length' => 100,'notnull'=>false]);
199
+        $table->addColumn('id', 'string', ['length' => 100, 'notnull'=>false]);
200 200
         $table->setPrimaryKey(['id']);
201 201
         foreach ($flatFields as $field) {
202 202
             if (in_array($field, ['id'])) {
Please login to merge, or discard this patch.
src/LocalChangesTracker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/ZohoDatabasePusher.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -122,13 +122,13 @@
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
src/ZohoSyncDatabaseCommand.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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'];
Please login to merge, or discard this patch.
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -194,7 +194,6 @@
 block discarded – undo
194 194
     
195 195
     /**
196 196
      * Regerate Zoho Daos
197
-     * @param InputInterface $input
198 197
      * @param OutputInterface $output
199 198
      */
200 199
     private function regenerateZohoDao(OutputInterface $output)
Please login to merge, or discard this patch.