Completed
Pull Request — 2.0 (#7)
by Raphaël
11:08
created
src/ZohoSyncDatabaseCommand.php 1 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   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
             foreach ($zohoBeans as $uid => $zohoBean) {
119 119
                 $this->connection->beginTransaction();
120 120
                 $this->connection->update($tableName, ['id' => $zohoBean->getZohoId()], ['uid' => $uid]);
121
-                $this->connection->delete('local_insert', [ 'uid' => $uid ]);
121
+                $this->connection->delete('local_insert', ['uid' => $uid]);
122 122
                 $this->connection->commit();
123 123
             }
124 124
         } else {
Please login to merge, or discard this patch.