@@ -22,7 +22,7 @@ discard block |
||
| 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 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | ) |
| 35 | 35 | ); |
| 36 | 36 | |
| 37 | - foreach(array_chunk($creating, 10) as $data) { |
|
| 37 | + foreach (array_chunk($creating, 10) as $data) { |
|
| 38 | 38 | dispatch(new CreateRecords( |
| 39 | 39 | $data, |
| 40 | 40 | $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(), |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | new FlushRows($this->apiKey, $this->baseId, $this->tableName) |
| 106 | 106 | ); |
| 107 | 107 | |
| 108 | - foreach(array_chunk($data, 10) as $rows) { |
|
| 108 | + foreach (array_chunk($data, 10) as $rows) { |
|
| 109 | 109 | dispatch(new CreateRecords( |
| 110 | 110 | $rows, |
| 111 | 111 | $this->apiKey, |