| @@ -22,12 +22,12 @@ | ||
| 22 | 22 |      { | 
| 23 | 23 | $creating = []; | 
| 24 | 24 | |
| 25 | -        foreach($items as $item) { | |
| 25 | +        foreach ($items as $item) { | |
| 26 | 26 | $creating[] = $item->toArray(); | 
| 27 | 27 | } | 
| 28 | 28 | |
| 29 | 29 | $creatingJobs = []; | 
| 30 | -        foreach(array_chunk($creating, 10) as $data) { | |
| 30 | +        foreach (array_chunk($creating, 10) as $data) { | |
| 31 | 31 | $creatingJobs[] = new CreateRecords( | 
| 32 | 32 | $data, | 
| 33 | 33 |                  $this->config('apiKey'), | 
| @@ -30,7 +30,7 @@ discard block | ||
| 30 | 30 | protected function filterModules(\Closure $filter, Progress $progress, $moduleInstances) | 
| 31 | 31 |      { | 
| 32 | 32 | return collect($progress->getModules()) | 
| 33 | -            ->filter($filter)->map(function (ModuleInstanceProgress $moduleInstanceProgress) use ($moduleInstances) { | |
| 33 | +            ->filter($filter)->map(function(ModuleInstanceProgress $moduleInstanceProgress) use ($moduleInstances) { | |
| 34 | 34 | return $moduleInstances[$moduleInstanceProgress->getModuleInstanceId()]; | 
| 35 | 35 | })->values()->toArray(); | 
| 36 | 36 | } | 
| @@ -41,35 +41,35 @@ discard block | ||
| 41 | 41 | ->getById($progress->getActivityInstanceId()); | 
| 42 | 42 | $moduleInstances = app(ModuleInstanceRepository::class) | 
| 43 | 43 | ->allThroughActivity($activityInstance->activity) | 
| 44 | -            ->reduce(function ($carry, ModuleInstance $moduleInstance) { | |
| 44 | +            ->reduce(function($carry, ModuleInstance $moduleInstance) { | |
| 45 | 45 | $carry[$moduleInstance->id()] = $moduleInstance->name; | 
| 46 | 46 | return $carry; | 
| 47 | 47 | }); | 
| 48 | 48 | |
| 49 | 49 | return [ | 
| 50 | 50 | 'Participant Name' => $activityInstance->participantName(), | 
| 51 | -            'Mandatory Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) { | |
| 51 | +            'Mandatory Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) { | |
| 52 | 52 | return $moduleInstanceProgress->isMandatory(); | 
| 53 | 53 | }, $progress, $moduleInstances), | 
| 54 | -            'Optional Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) { | |
| 54 | +            'Optional Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) { | |
| 55 | 55 | return !$moduleInstanceProgress->isMandatory(); | 
| 56 | 56 | }, $progress, $moduleInstances), | 
| 57 | -            'Complete Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) { | |
| 57 | +            'Complete Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) { | |
| 58 | 58 | return $moduleInstanceProgress->isComplete(); | 
| 59 | 59 | }, $progress, $moduleInstances), | 
| 60 | -            'Incomplete Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) { | |
| 60 | +            'Incomplete Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) { | |
| 61 | 61 | return !$moduleInstanceProgress->isComplete(); | 
| 62 | 62 | }, $progress, $moduleInstances), | 
| 63 | -            'Active Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) { | |
| 63 | +            'Active Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) { | |
| 64 | 64 | return $moduleInstanceProgress->isActive(); | 
| 65 | 65 | }, $progress, $moduleInstances), | 
| 66 | -            'Inactive Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) { | |
| 66 | +            'Inactive Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) { | |
| 67 | 67 | return !$moduleInstanceProgress->isActive(); | 
| 68 | 68 | }, $progress, $moduleInstances), | 
| 69 | -            'Hidden Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) { | |
| 69 | +            'Hidden Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) { | |
| 70 | 70 | return !$moduleInstanceProgress->isVisible(); | 
| 71 | 71 | }, $progress, $moduleInstances), | 
| 72 | -            'Visible Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) { | |
| 72 | +            'Visible Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) { | |
| 73 | 73 | return $moduleInstanceProgress->isVisible(); | 
| 74 | 74 | }, $progress, $moduleInstances), | 
| 75 | 75 | '% Complete' => $progress->getPercentage(), | 
| @@ -101,7 +101,7 @@ discard block | ||
| 101 | 101 | protected function createRecords(array $data) | 
| 102 | 102 |      { | 
| 103 | 103 | $creatingJobs = []; | 
| 104 | -        foreach(array_chunk($data, 10) as $rows) { | |
| 104 | +        foreach (array_chunk($data, 10) as $rows) { | |
| 105 | 105 | $creatingJobs[] = new CreateRecords( | 
| 106 | 106 | $rows, | 
| 107 | 107 | $this->apiKey, |