Completed
Push — 2.0 ( 2ec1a2...63e9fb )
by Raphaël
04:24
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/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', 'integer');
52
-        $localDelete->addColumn('id',  'string', ['length' => 100]);
52
+        $localDelete->addColumn('id', 'string', ['length' => 100]);
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/ZohoSyncDatabaseCommand.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,6 @@
 block discarded – undo
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){
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $this->zohoDatabaseModelSync = $zohoDatabaseModelSync;
87 87
         $this->zohoDatabaseCopier = $zohoDatabaseCopier;
88 88
         $this->zohoDatabaseSync = $zohoDatabaseSync;
89
-        $this->zohoEntitiesGenerator =  $zohoEntitiesGenerator;
89
+        $this->zohoEntitiesGenerator = $zohoEntitiesGenerator;
90 90
         $this->zohoClient = $zohoClient;
91 91
         $this->pathZohoDaos = $pathZohoDaos;
92 92
         $this->namespaceZohoDaos = $namespaceZohoDaos;
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      */
160 160
     private function getListFieldName(AbstractZohoDao $zohoDao)
161 161
     {
162
-        $fieldNames= array();
162
+        $fieldNames = array();
163 163
         foreach ($zohoDao->getFields() as $fieldsDescriptor) {
164 164
             foreach (array_values($fieldsDescriptor) as $fieldDescriptor) {
165 165
                 $fieldNames[] = $fieldDescriptor['name'];
@@ -177,11 +177,11 @@  discard block
 block discarded – undo
177 177
     private function regenerateZohoDao(OutputInterface $output)
178 178
     {
179 179
         $output->writeln("Start to generate all the zoho daos.");
180
-        $zohoModules = $this->zohoEntitiesGenerator->generateAll($this->pathZohoDaos,$this->namespaceZohoDaos);
180
+        $zohoModules = $this->zohoEntitiesGenerator->generateAll($this->pathZohoDaos, $this->namespaceZohoDaos);
181 181
         foreach ($zohoModules as $daoFullClassName) {
182 182
             /* @var $zohoDao AbstractZohoDao */
183 183
             $zohoDao = new $daoFullClassName($this->zohoClient);
184
-            if(!in_array('lastActivityTime', $this->getListFieldName($zohoDao))){
184
+            if (!in_array('lastActivityTime', $this->getListFieldName($zohoDao))) {
185 185
                 continue;
186 186
             }
187 187
             $this->zohoDaos [] = $zohoDao;
Please login to merge, or discard this patch.
src/ZohoDatabasePusher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,8 +117,8 @@
 block discarded – undo
117 117
         if (!$update) {
118 118
             foreach ($zohoBeans as $uid => $zohoBean) {
119 119
 //                $this->connection->beginTransaction();
120
-                $this->connection->update($tableName, ['id' => $zohoBean->getZohoId()], ['table_name'=>$tableName,'uid' => $uid]);
121
-                $this->connection->delete($localTable, ['table_name'=>$tableName, 'uid' => $uid ]);
120
+                $this->connection->update($tableName, ['id' => $zohoBean->getZohoId()], ['table_name'=>$tableName, 'uid' => $uid]);
121
+                $this->connection->delete($localTable, ['table_name'=>$tableName, 'uid' => $uid]);
122 122
 //                $this->connection->commit();
123 123
             }
124 124
         } else {
Please login to merge, or discard this patch.