@@ -21,7 +21,7 @@ |
||
| 21 | 21 | |
| 22 | 22 | public function update(DataUser $oldDataUser, DataUser $newDataUser) |
| 23 | 23 | { |
| 24 | - $this->cache->forget(DataUserCache::class . '@getById:' . $newDataUser->id()); |
|
| 24 | + $this->cache->forget(DataUserCache::class.'@getById:'.$newDataUser->id()); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | } |
| 28 | 28 | \ No newline at end of file |
@@ -44,16 +44,16 @@ |
||
| 44 | 44 | */ |
| 45 | 45 | public function handle() |
| 46 | 46 | { |
| 47 | - $time=-hrtime(true); |
|
| 47 | + $time = -hrtime(true); |
|
| 48 | 48 | Exporter::driver($this->option('exporter'))->export($this->exportData()); |
| 49 | 49 | $this->info('Export complete'); |
| 50 | - $time+=hrtime(true); |
|
| 50 | + $time += hrtime(true); |
|
| 51 | 51 | $this->info(sprintf('Export took %.2f s to run', $time / 1e+9)); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | private function exportData() |
| 55 | 55 | { |
| 56 | - switch($this->argument('type')) { |
|
| 56 | + switch ($this->argument('type')) { |
|
| 57 | 57 | case 'user': |
| 58 | 58 | return app(User::class)->all(); |
| 59 | 59 | break; |
@@ -21,31 +21,31 @@ |
||
| 21 | 21 | |
| 22 | 22 | public function create(RoleModel $roleModel) |
| 23 | 23 | { |
| 24 | - $this->cache->forget(RoleCache::class . '@count'); |
|
| 25 | - $this->cache->forget(RoleCache::class . '@getByDataProviderId:' . $roleModel->dataProviderId()); |
|
| 26 | - $this->cache->forget(RoleCache::class . '@allThroughGroup:' . $roleModel->groupId()); |
|
| 27 | - $this->cache->forget(RoleCache::class . '@allThroughPosition:' . $roleModel->positionId()); |
|
| 24 | + $this->cache->forget(RoleCache::class.'@count'); |
|
| 25 | + $this->cache->forget(RoleCache::class.'@getByDataProviderId:'.$roleModel->dataProviderId()); |
|
| 26 | + $this->cache->forget(RoleCache::class.'@allThroughGroup:'.$roleModel->groupId()); |
|
| 27 | + $this->cache->forget(RoleCache::class.'@allThroughPosition:'.$roleModel->positionId()); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | public function delete(RoleModel $role) |
| 31 | 31 | { |
| 32 | - $this->cache->forget(RoleCache::class . '@count'); |
|
| 33 | - $this->cache->forget(RoleCache::class . '@getById:' . $role->id()); |
|
| 34 | - $this->cache->forget(RoleCache::class . '@getByDataProviderId:' . $role->dataProviderId()); |
|
| 35 | - $this->cache->forget(RoleCache::class . '@allThroughGroup:' . $role->groupId()); |
|
| 36 | - $this->cache->forget(RoleCache::class . '@allThroughPosition:' . $role->positionId()); |
|
| 32 | + $this->cache->forget(RoleCache::class.'@count'); |
|
| 33 | + $this->cache->forget(RoleCache::class.'@getById:'.$role->id()); |
|
| 34 | + $this->cache->forget(RoleCache::class.'@getByDataProviderId:'.$role->dataProviderId()); |
|
| 35 | + $this->cache->forget(RoleCache::class.'@allThroughGroup:'.$role->groupId()); |
|
| 36 | + $this->cache->forget(RoleCache::class.'@allThroughPosition:'.$role->positionId()); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | public function update(RoleModel $oldRole, RoleModel $newRole) |
| 40 | 40 | { |
| 41 | - $this->cache->forget(RoleCache::class . '@count'); |
|
| 42 | - $this->cache->forget(RoleCache::class . '@getById:' . $newRole->id()); |
|
| 43 | - $this->cache->forget(RoleCache::class . '@getByDataProviderId:' . $oldRole->dataProviderId()); |
|
| 44 | - $this->cache->forget(RoleCache::class . '@getByDataProviderId:' . $newRole->dataProviderId()); |
|
| 45 | - $this->cache->forget(RoleCache::class . '@allThroughPosition:' . $oldRole->positionId()); |
|
| 46 | - $this->cache->forget(RoleCache::class . '@allThroughPosition:' . $newRole->positionId()); |
|
| 47 | - $this->cache->forget(RoleCache::class . '@allThroughGroup:' . $oldRole->groupId()); |
|
| 48 | - $this->cache->forget(RoleCache::class . '@allThroughGroup:' . $newRole->groupId()); |
|
| 41 | + $this->cache->forget(RoleCache::class.'@count'); |
|
| 42 | + $this->cache->forget(RoleCache::class.'@getById:'.$newRole->id()); |
|
| 43 | + $this->cache->forget(RoleCache::class.'@getByDataProviderId:'.$oldRole->dataProviderId()); |
|
| 44 | + $this->cache->forget(RoleCache::class.'@getByDataProviderId:'.$newRole->dataProviderId()); |
|
| 45 | + $this->cache->forget(RoleCache::class.'@allThroughPosition:'.$oldRole->positionId()); |
|
| 46 | + $this->cache->forget(RoleCache::class.'@allThroughPosition:'.$newRole->positionId()); |
|
| 47 | + $this->cache->forget(RoleCache::class.'@allThroughGroup:'.$oldRole->groupId()); |
|
| 48 | + $this->cache->forget(RoleCache::class.'@allThroughGroup:'.$newRole->groupId()); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | } |
| 52 | 52 | \ No newline at end of file |