@@ -62,7 +62,7 @@ |
||
| 62 | 62 | |
| 63 | 63 | private function log(string $string) |
| 64 | 64 | { |
| 65 | - if($this->debug) { |
|
| 65 | + if ($this->debug) { |
|
| 66 | 66 | Log::debug($string); |
| 67 | 67 | } |
| 68 | 68 | } |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | |
| 66 | 66 | private function log(string $string) |
| 67 | 67 | { |
| 68 | - if($this->debug) { |
|
| 68 | + if ($this->debug) { |
|
| 69 | 69 | Log::debug($string); |
| 70 | 70 | } |
| 71 | 71 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | $ids = $airTable->getIdsFromTable(); |
| 37 | 37 | $this->log('Retrieved IDs'); |
| 38 | 38 | $this->log('Deleting Rows'); |
| 39 | - foreach(array_chunk($ids, 50) as $idsToDelete) { |
|
| 39 | + foreach (array_chunk($ids, 50) as $idsToDelete) { |
|
| 40 | 40 | dispatch((new DeleteRows( |
| 41 | 41 | $idsToDelete, |
| 42 | 42 | $this->apiKey, |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | private function log(string $string) |
| 56 | 56 | { |
| 57 | - if($this->debug) { |
|
| 57 | + if ($this->debug) { |
|
| 58 | 58 | Log::debug($string); |
| 59 | 59 | } |
| 60 | 60 | } |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | protected function filterModules(\Closure $filter, Progress $progress, $moduleInstances) |
| 34 | 34 | { |
| 35 | 35 | return collect($progress->getModules()) |
| 36 | - ->filter($filter)->map(function (ModuleInstanceProgress $moduleInstanceProgress) use ($moduleInstances) { |
|
| 36 | + ->filter($filter)->map(function(ModuleInstanceProgress $moduleInstanceProgress) use ($moduleInstances) { |
|
| 37 | 37 | return $moduleInstances[$moduleInstanceProgress->getModuleInstanceId()]; |
| 38 | 38 | })->values()->toArray(); |
| 39 | 39 | } |
@@ -44,35 +44,35 @@ discard block |
||
| 44 | 44 | ->getById($progress->getActivityInstanceId()); |
| 45 | 45 | $moduleInstances = app(ModuleInstanceRepository::class) |
| 46 | 46 | ->allThroughActivity($activityInstance->activity) |
| 47 | - ->reduce(function ($carry, ModuleInstance $moduleInstance) { |
|
| 47 | + ->reduce(function($carry, ModuleInstance $moduleInstance) { |
|
| 48 | 48 | $carry[$moduleInstance->id()] = $moduleInstance->name; |
| 49 | 49 | return $carry; |
| 50 | 50 | }); |
| 51 | 51 | |
| 52 | 52 | return [ |
| 53 | 53 | 'Participant Name' => $activityInstance->participantName(), |
| 54 | - 'Mandatory Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) { |
|
| 54 | + 'Mandatory Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) { |
|
| 55 | 55 | return $moduleInstanceProgress->isMandatory(); |
| 56 | 56 | }, $progress, $moduleInstances), |
| 57 | - 'Optional Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) { |
|
| 57 | + 'Optional Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) { |
|
| 58 | 58 | return !$moduleInstanceProgress->isMandatory(); |
| 59 | 59 | }, $progress, $moduleInstances), |
| 60 | - 'Complete Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) { |
|
| 60 | + 'Complete Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) { |
|
| 61 | 61 | return $moduleInstanceProgress->isComplete(); |
| 62 | 62 | }, $progress, $moduleInstances), |
| 63 | - 'Incomplete Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) { |
|
| 63 | + 'Incomplete Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) { |
|
| 64 | 64 | return !$moduleInstanceProgress->isComplete(); |
| 65 | 65 | }, $progress, $moduleInstances), |
| 66 | - 'Active Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) { |
|
| 66 | + 'Active Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) { |
|
| 67 | 67 | return $moduleInstanceProgress->isActive(); |
| 68 | 68 | }, $progress, $moduleInstances), |
| 69 | - 'Inactive Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) { |
|
| 69 | + 'Inactive Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) { |
|
| 70 | 70 | return !$moduleInstanceProgress->isActive(); |
| 71 | 71 | }, $progress, $moduleInstances), |
| 72 | - 'Hidden Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) { |
|
| 72 | + 'Hidden Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) { |
|
| 73 | 73 | return !$moduleInstanceProgress->isVisible(); |
| 74 | 74 | }, $progress, $moduleInstances), |
| 75 | - 'Visible Modules' => $this->filterModules(function (ModuleInstanceProgress $moduleInstanceProgress) { |
|
| 75 | + 'Visible Modules' => $this->filterModules(function(ModuleInstanceProgress $moduleInstanceProgress) { |
|
| 76 | 76 | return $moduleInstanceProgress->isVisible(); |
| 77 | 77 | }, $progress, $moduleInstances), |
| 78 | 78 | '% Complete' => $progress->getPercentage(), |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | $this->log('Flushed rows'); |
| 114 | 114 | |
| 115 | - foreach(array_chunk($data, 10) as $rows) { |
|
| 115 | + foreach (array_chunk($data, 10) as $rows) { |
|
| 116 | 116 | dispatch((new CreateRecords( |
| 117 | 117 | $rows, |
| 118 | 118 | $this->apiKey, |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | private function log(string $string) |
| 128 | 128 | { |
| 129 | - if($this->debug) { |
|
| 129 | + if ($this->debug) { |
|
| 130 | 130 | Log::debug($string); |
| 131 | 131 | } |
| 132 | 132 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | { |
| 24 | 24 | $creating = []; |
| 25 | 25 | |
| 26 | - foreach($items as $item) { |
|
| 26 | + foreach ($items as $item) { |
|
| 27 | 27 | $creating[] = $item->toArray(); |
| 28 | 28 | } |
| 29 | 29 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $this->log('Flushed rows. Creating records'); |
| 41 | 41 | |
| 42 | 42 | |
| 43 | - foreach(array_chunk($creating, 10) as $data) { |
|
| 43 | + foreach (array_chunk($creating, 10) as $data) { |
|
| 44 | 44 | dispatch((new CreateRecords( |
| 45 | 45 | $data, |
| 46 | 46 | $this->config('apiKey'), |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | private function log(string $string) |
| 57 | 57 | { |
| 58 | - if($this->config('debug', false)) { |
|
| 58 | + if ($this->config('debug', false)) { |
|
| 59 | 59 | Log::debug($string); |
| 60 | 60 | } |
| 61 | 61 | } |