Code Duplication    Length = 6-8 lines in 5 locations

code/tasks/UpdateModules.php 5 locations

@@ 237-244 (lines=8) @@
234
            //Update Repository description
235
            //$moduleObject->updateGitHubInfo(array());
236
237
            if( ! $moduleObject->add()) {
238
            
239
                $msg = "Could not add files module to Repo";
240
                GeneralMethods::outputToScreen ($msg);
241
                UpdateModules::$unsolvedItems[$moduleObject->ModuleName] = $msg;
242
                continue;
243
            
244
            }
245
            if( ! $moduleObject->commit())     {
246
                $msg = "Could not commit files to Repo";
247
                GeneralMethods::outputToScreen ($msg);
@@ 245-250 (lines=6) @@
242
                continue;
243
            
244
            }
245
            if( ! $moduleObject->commit())     {
246
                $msg = "Could not commit files to Repo";
247
                GeneralMethods::outputToScreen ($msg);
248
                UpdateModules::$unsolvedItems[$moduleObject->ModuleName] = $msg;
249
                continue;                
250
            }
251
            
252
            if( ! $moduleObject->push()) {
253
                $msg = "Could not push files to Repo";
@@ 252-257 (lines=6) @@
249
                continue;                
250
            }
251
            
252
            if( ! $moduleObject->push()) {
253
                $msg = "Could not push files to Repo";
254
                GeneralMethods::outputToScreen ($msg);
255
                UpdateModules::$unsolvedItems[$moduleObject->ModuleName] = $msg;
256
                continue;                    
257
            }
258
            if( ! $moduleObject->removeClone()) 
259
            {
260
                $msg = "Could not remove local copy of repo";
@@ 258-263 (lines=6) @@
255
                UpdateModules::$unsolvedItems[$moduleObject->ModuleName] = $msg;
256
                continue;                    
257
            }
258
            if( ! $moduleObject->removeClone()) 
259
            {
260
                $msg = "Could not remove local copy of repo";
261
                GeneralMethods::outputToScreen ($msg);
262
                UpdateModules::$unsolvedItems[$moduleObject->ModuleName] = $msg;                
263
            }
264
            
265
            $addRepoToScrutinzer = $this->Config()->get('add_to_scrutinizer');
266
            if ($addRepoToScrutinzer) {
@@ 412-418 (lines=7) @@
409
410
411
        $fileContent = file_get_contents($fileName);
412
        if (!$fileContent) {
413
            
414
            $msg = "Could not open $fileName to check for excluded words";
415
            
416
            GeneralMethods::outputToScreen ($msg);
417
            UpdateModules::$unsolvedItems[$moduleObject->ModuleName] = $msg;
418
        }
419
420
        foreach ($wordArray as $word)  {
421