diff --git a/src/Authorization/Roles/IntegrationPlatformUser.php b/src/Authorization/Roles/IntegrationPlatformUser.php index 142df30..7e36e9a 100644 --- a/src/Authorization/Roles/IntegrationPlatformUser.php +++ b/src/Authorization/Roles/IntegrationPlatformUser.php @@ -35,7 +35,7 @@ public function apply(Builder $builder, Model $model) $builder->where('iam_account_id', UserHelper::currentAccount()->id); } - public function checkPrivileges(Users $users = null) + public function checkPrivileges(?Users $users = null) { //return UserHelper::hasRole(self::NAME, $users); } diff --git a/src/Database/Filters/AccountProviderOverviewsQueryFilter.php b/src/Database/Filters/AccountProviderOverviewsQueryFilter.php index c394ba7..1d9cc35 100644 --- a/src/Database/Filters/AccountProviderOverviewsQueryFilter.php +++ b/src/Database/Filters/AccountProviderOverviewsQueryFilter.php @@ -17,7 +17,7 @@ class AccountProviderOverviewsQueryFilter extends AbstractQueryFilter * @var Builder */ protected $builder; - + public function ipaasProviderName($value) { return $this->builder->where('ipaas_provider_name', 'ilike', '%' . $value . '%'); @@ -28,7 +28,7 @@ public function ipaas_provider_name($value) { return $this->ipaasProviderName($value); } - + public function providerType($value) { return $this->builder->where('provider_type', 'ilike', '%' . $value . '%'); @@ -39,7 +39,7 @@ public function provider_type($value) { return $this->providerType($value); } - + public function baseUrl($value) { return $this->builder->where('base_url', 'ilike', '%' . $value . '%'); @@ -50,7 +50,7 @@ public function base_url($value) { return $this->baseUrl($value); } - + public function totalWorkflows($value) { $operator = substr($value, 0, 1); @@ -69,7 +69,7 @@ public function total_workflows($value) { return $this->totalWorkflows($value); } - + public function totalAutomationEngines($value) { $operator = substr($value, 0, 1); @@ -88,7 +88,7 @@ public function total_automation_engines($value) { return $this->totalAutomationEngines($value); } - + public function executionsToday($value) { $operator = substr($value, 0, 1); @@ -107,7 +107,7 @@ public function executions_today($value) { return $this->executionsToday($value); } - + public function successToday($value) { $operator = substr($value, 0, 1); @@ -126,7 +126,7 @@ public function success_today($value) { return $this->successToday($value); } - + public function errorsToday($value) { $operator = substr($value, 0, 1); @@ -145,7 +145,7 @@ public function errors_today($value) { return $this->errorsToday($value); } - + public function isDefaultWap($value) { return $this->builder->where('is_default_wap', $value); @@ -156,7 +156,7 @@ public function is_default_wap($value) { return $this->isDefaultWap($value); } - + public function providerCreatedAtStart($date) { return $this->builder->where('provider_created_at', '>=', $date); @@ -210,7 +210,7 @@ public function iamAccountId($value) } } - + public function ipaasProviderId($value) { $ipaasProvider = \NextDeveloper\IPAAS\Database\Models\Providers::where('uuid', $value)->first(); @@ -225,7 +225,7 @@ public function ipaas_provider_id($value) { return $this->ipaasProvider($value); } - + // EDIT AFTER HERE - WARNING: ABOVE THIS LINE MAY BE REGENERATED AND YOU MAY LOSE CODE diff --git a/src/Database/Filters/AccountStatsQueryFilter.php b/src/Database/Filters/AccountStatsQueryFilter.php index f5e16f4..1131699 100644 --- a/src/Database/Filters/AccountStatsQueryFilter.php +++ b/src/Database/Filters/AccountStatsQueryFilter.php @@ -36,7 +36,7 @@ public function total_providers($value) { return $this->totalProviders($value); } - + public function totalWorkflows($value) { $operator = substr($value, 0, 1); @@ -55,7 +55,7 @@ public function total_workflows($value) { return $this->totalWorkflows($value); } - + public function executionsToday($value) { $operator = substr($value, 0, 1); @@ -74,7 +74,7 @@ public function executions_today($value) { return $this->executionsToday($value); } - + public function successToday($value) { $operator = substr($value, 0, 1); @@ -93,7 +93,7 @@ public function success_today($value) { return $this->successToday($value); } - + public function errorsToday($value) { $operator = substr($value, 0, 1); @@ -112,7 +112,7 @@ public function errors_today($value) { return $this->errorsToday($value); } - + public function iamAccountId($value) { $iamAccount = \NextDeveloper\IAM\Database\Models\Accounts::where('uuid', $value)->first(); @@ -122,7 +122,7 @@ public function iamAccountId($value) } } - + // EDIT AFTER HERE - WARNING: ABOVE THIS LINE MAY BE REGENERATED AND YOU MAY LOSE CODE diff --git a/src/Database/Filters/AccountsQueryFilter.php b/src/Database/Filters/AccountsQueryFilter.php index a2ba17f..7dad3b1 100644 --- a/src/Database/Filters/AccountsQueryFilter.php +++ b/src/Database/Filters/AccountsQueryFilter.php @@ -28,7 +28,7 @@ public function is_service_enabled($value) { return $this->isServiceEnabled($value); } - + public function createdAtStart($date) { return $this->builder->where('created_at', '>=', $date); @@ -104,7 +104,7 @@ public function iamAccountId($value) } } - + // EDIT AFTER HERE - WARNING: ABOVE THIS LINE MAY BE REGENERATED AND YOU MAY LOSE CODE diff --git a/src/Database/Filters/ExecutionDailyStatsQueryFilter.php b/src/Database/Filters/ExecutionDailyStatsQueryFilter.php index 4fa3f58..da9bb59 100644 --- a/src/Database/Filters/ExecutionDailyStatsQueryFilter.php +++ b/src/Database/Filters/ExecutionDailyStatsQueryFilter.php @@ -17,7 +17,7 @@ class ExecutionDailyStatsQueryFilter extends AbstractQueryFilter * @var Builder */ protected $builder; - + public function providerName($value) { return $this->builder->where('provider_name', 'ilike', '%' . $value . '%'); @@ -28,7 +28,7 @@ public function provider_name($value) { return $this->providerName($value); } - + public function providerType($value) { return $this->builder->where('provider_type', 'ilike', '%' . $value . '%'); @@ -39,7 +39,7 @@ public function provider_type($value) { return $this->providerType($value); } - + public function totalExecutions($value) { $operator = substr($value, 0, 1); @@ -58,7 +58,7 @@ public function total_executions($value) { return $this->totalExecutions($value); } - + public function successCount($value) { $operator = substr($value, 0, 1); @@ -77,7 +77,7 @@ public function success_count($value) { return $this->successCount($value); } - + public function errorCount($value) { $operator = substr($value, 0, 1); @@ -96,7 +96,7 @@ public function error_count($value) { return $this->errorCount($value); } - + public function canceledCount($value) { $operator = substr($value, 0, 1); @@ -115,7 +115,7 @@ public function canceled_count($value) { return $this->canceledCount($value); } - + public function statDateStart($date) { return $this->builder->where('stat_date', '>=', $date); @@ -147,7 +147,7 @@ public function iamAccountId($value) } } - + public function ipaasProviderId($value) { $ipaasProvider = \NextDeveloper\IPAAS\Database\Models\Providers::where('uuid', $value)->first(); @@ -162,7 +162,7 @@ public function ipaas_provider_id($value) { return $this->ipaasProvider($value); } - + // EDIT AFTER HERE - WARNING: ABOVE THIS LINE MAY BE REGENERATED AND YOU MAY LOSE CODE diff --git a/src/Database/Filters/PlatformHealthPerspectiveQueryFilter.php b/src/Database/Filters/PlatformHealthPerspectiveQueryFilter.php index d35cc14..316e28a 100644 --- a/src/Database/Filters/PlatformHealthPerspectiveQueryFilter.php +++ b/src/Database/Filters/PlatformHealthPerspectiveQueryFilter.php @@ -17,7 +17,7 @@ class PlatformHealthPerspectiveQueryFilter extends AbstractQueryFilter * @var Builder */ protected $builder; - + public function providerName($value) { return $this->builder->where('provider_name', 'ilike', '%' . $value . '%'); @@ -28,7 +28,7 @@ public function provider_name($value) { return $this->providerName($value); } - + public function providerType($value) { return $this->builder->where('provider_type', 'ilike', '%' . $value . '%'); @@ -39,7 +39,7 @@ public function provider_type($value) { return $this->providerType($value); } - + public function lastExecutionStatus($value) { return $this->builder->where('last_execution_status', 'ilike', '%' . $value . '%'); @@ -50,7 +50,7 @@ public function last_execution_status($value) { return $this->lastExecutionStatus($value); } - + public function healthStatus($value) { return $this->builder->where('health_status', 'ilike', '%' . $value . '%'); @@ -61,7 +61,7 @@ public function health_status($value) { return $this->healthStatus($value); } - + public function activeWorkflows($value) { $operator = substr($value, 0, 1); @@ -80,7 +80,7 @@ public function active_workflows($value) { return $this->activeWorkflows($value); } - + public function executionsToday($value) { $operator = substr($value, 0, 1); @@ -99,7 +99,7 @@ public function executions_today($value) { return $this->executionsToday($value); } - + public function successToday($value) { $operator = substr($value, 0, 1); @@ -118,7 +118,7 @@ public function success_today($value) { return $this->successToday($value); } - + public function errorsToday($value) { $operator = substr($value, 0, 1); @@ -137,7 +137,7 @@ public function errors_today($value) { return $this->errorsToday($value); } - + public function runningToday($value) { $operator = substr($value, 0, 1); @@ -156,7 +156,7 @@ public function running_today($value) { return $this->runningToday($value); } - + public function isDefaultWap($value) { return $this->builder->where('is_default_wap', $value); @@ -167,7 +167,7 @@ public function is_default_wap($value) { return $this->isDefaultWap($value); } - + public function lastExecutionAtStart($date) { return $this->builder->where('last_execution_at', '>=', $date); @@ -221,7 +221,7 @@ public function iamAccountId($value) } } - + public function ipaasProviderId($value) { $ipaasProvider = \NextDeveloper\IPAAS\Database\Models\Providers::where('uuid', $value)->first(); @@ -236,7 +236,7 @@ public function ipaas_provider_id($value) { return $this->ipaasProvider($value); } - + // EDIT AFTER HERE - WARNING: ABOVE THIS LINE MAY BE REGENERATED AND YOU MAY LOSE CODE diff --git a/src/Database/Filters/ProvidersQueryFilter.php b/src/Database/Filters/ProvidersQueryFilter.php index 376cb1e..548879b 100644 --- a/src/Database/Filters/ProvidersQueryFilter.php +++ b/src/Database/Filters/ProvidersQueryFilter.php @@ -17,19 +17,19 @@ class ProvidersQueryFilter extends AbstractQueryFilter * @var Builder */ protected $builder; - + public function name($value) { return $this->builder->where('name', 'ilike', '%' . $value . '%'); } - + public function description($value) { return $this->builder->where('description', 'ilike', '%' . $value . '%'); } - + public function providerType($value) { return $this->builder->where('provider_type', 'ilike', '%' . $value . '%'); @@ -40,7 +40,7 @@ public function provider_type($value) { return $this->providerType($value); } - + public function externalAccountId($value) { return $this->builder->where('external_account_id', 'ilike', '%' . $value . '%'); @@ -51,13 +51,13 @@ public function external_account_id($value) { return $this->externalAccountId($value); } - + public function region($value) { return $this->builder->where('region', 'ilike', '%' . $value . '%'); } - + public function baseUrl($value) { return $this->builder->where('base_url', 'ilike', '%' . $value . '%'); @@ -68,7 +68,7 @@ public function base_url($value) { return $this->baseUrl($value); } - + public function apiToken($value) { return $this->builder->where('api_token', 'ilike', '%' . $value . '%'); @@ -79,7 +79,7 @@ public function api_token($value) { return $this->apiToken($value); } - + public function apiSecret($value) { return $this->builder->where('api_secret', 'ilike', '%' . $value . '%'); @@ -90,7 +90,7 @@ public function api_secret($value) { return $this->apiSecret($value); } - + public function isDefaultWap($value) { return $this->builder->where('is_default_wap', $value); @@ -101,7 +101,7 @@ public function is_default_wap($value) { return $this->isDefaultWap($value); } - + public function createdAtStart($date) { return $this->builder->where('created_at', '>=', $date); @@ -182,7 +182,7 @@ public function iaas_virtual_machine_id($value) { return $this->iaasVirtualMachine($value); } - + public function iamAccountId($value) { $iamAccount = \NextDeveloper\IAM\Database\Models\Accounts::where('uuid', $value)->first(); @@ -192,7 +192,7 @@ public function iamAccountId($value) } } - + public function iamUserId($value) { $iamUser = \NextDeveloper\IAM\Database\Models\Users::where('uuid', $value)->first(); @@ -202,7 +202,7 @@ public function iamUserId($value) } } - + // EDIT AFTER HERE - WARNING: ABOVE THIS LINE MAY BE REGENERATED AND YOU MAY LOSE CODE diff --git a/src/Database/Filters/WorkflowDailyStatsQueryFilter.php b/src/Database/Filters/WorkflowDailyStatsQueryFilter.php index 63c1ef3..37b6252 100644 --- a/src/Database/Filters/WorkflowDailyStatsQueryFilter.php +++ b/src/Database/Filters/WorkflowDailyStatsQueryFilter.php @@ -36,7 +36,7 @@ public function total_executions($value) { return $this->totalExecutions($value); } - + public function successCount($value) { $operator = substr($value, 0, 1); @@ -55,7 +55,7 @@ public function success_count($value) { return $this->successCount($value); } - + public function errorCount($value) { $operator = substr($value, 0, 1); @@ -74,7 +74,7 @@ public function error_count($value) { return $this->errorCount($value); } - + public function canceledCount($value) { $operator = substr($value, 0, 1); @@ -93,7 +93,7 @@ public function canceled_count($value) { return $this->canceledCount($value); } - + public function avgDurationMs($value) { $operator = substr($value, 0, 1); @@ -112,7 +112,7 @@ public function avg_duration_ms($value) { return $this->avgDurationMs($value); } - + public function maxDurationMs($value) { $operator = substr($value, 0, 1); @@ -131,7 +131,7 @@ public function max_duration_ms($value) { return $this->maxDurationMs($value); } - + public function statDateStart($date) { return $this->builder->where('stat_date', '>=', $date); @@ -212,7 +212,7 @@ public function ipaas_workflow_id($value) { return $this->ipaasWorkflow($value); } - + public function iamAccountId($value) { $iamAccount = \NextDeveloper\IAM\Database\Models\Accounts::where('uuid', $value)->first(); @@ -222,7 +222,7 @@ public function iamAccountId($value) } } - + // EDIT AFTER HERE - WARNING: ABOVE THIS LINE MAY BE REGENERATED AND YOU MAY LOSE CODE diff --git a/src/Database/Filters/WorkflowExecutionsPerspectiveQueryFilter.php b/src/Database/Filters/WorkflowExecutionsPerspectiveQueryFilter.php index b9c10df..d3398c1 100644 --- a/src/Database/Filters/WorkflowExecutionsPerspectiveQueryFilter.php +++ b/src/Database/Filters/WorkflowExecutionsPerspectiveQueryFilter.php @@ -17,13 +17,13 @@ class WorkflowExecutionsPerspectiveQueryFilter extends AbstractQueryFilter * @var Builder */ protected $builder; - + public function status($value) { return $this->builder->where('status', 'ilike', '%' . $value . '%'); } - + public function triggerMode($value) { return $this->builder->where('trigger_mode', 'ilike', '%' . $value . '%'); @@ -34,7 +34,7 @@ public function trigger_mode($value) { return $this->triggerMode($value); } - + public function errorMessage($value) { return $this->builder->where('error_message', 'ilike', '%' . $value . '%'); @@ -45,7 +45,7 @@ public function error_message($value) { return $this->errorMessage($value); } - + public function errorNode($value) { return $this->builder->where('error_node', 'ilike', '%' . $value . '%'); @@ -56,7 +56,7 @@ public function error_node($value) { return $this->errorNode($value); } - + public function externalExecutionId($value) { return $this->builder->where('external_execution_id', 'ilike', '%' . $value . '%'); @@ -67,7 +67,7 @@ public function external_execution_id($value) { return $this->externalExecutionId($value); } - + public function workflowName($value) { return $this->builder->where('workflow_name', 'ilike', '%' . $value . '%'); @@ -78,7 +78,7 @@ public function workflow_name($value) { return $this->workflowName($value); } - + public function providerName($value) { return $this->builder->where('provider_name', 'ilike', '%' . $value . '%'); @@ -89,7 +89,7 @@ public function provider_name($value) { return $this->providerName($value); } - + public function providerType($value) { return $this->builder->where('provider_type', 'ilike', '%' . $value . '%'); @@ -100,7 +100,7 @@ public function provider_type($value) { return $this->providerType($value); } - + public function durationMs($value) { $operator = substr($value, 0, 1); @@ -119,7 +119,7 @@ public function duration_ms($value) { return $this->durationMs($value); } - + public function startedAtStart($date) { return $this->builder->where('started_at', '>=', $date); @@ -222,7 +222,7 @@ public function ipaas_workflow_id($value) { return $this->ipaasWorkflow($value); } - + public function ipaasProviderId($value) { $ipaasProvider = \NextDeveloper\IPAAS\Database\Models\Providers::where('uuid', $value)->first(); @@ -237,7 +237,7 @@ public function ipaas_provider_id($value) { return $this->ipaasProvider($value); } - + public function iamAccountId($value) { $iamAccount = \NextDeveloper\IAM\Database\Models\Accounts::where('uuid', $value)->first(); @@ -247,7 +247,7 @@ public function iamAccountId($value) } } - + // EDIT AFTER HERE - WARNING: ABOVE THIS LINE MAY BE REGENERATED AND YOU MAY LOSE CODE diff --git a/src/Database/Filters/WorkflowExecutionsQueryFilter.php b/src/Database/Filters/WorkflowExecutionsQueryFilter.php index 2e4c5e2..f4d7a18 100644 --- a/src/Database/Filters/WorkflowExecutionsQueryFilter.php +++ b/src/Database/Filters/WorkflowExecutionsQueryFilter.php @@ -17,7 +17,7 @@ class WorkflowExecutionsQueryFilter extends AbstractQueryFilter * @var Builder */ protected $builder; - + public function externalExecutionId($value) { return $this->builder->where('external_execution_id', 'ilike', '%' . $value . '%'); @@ -28,13 +28,13 @@ public function external_execution_id($value) { return $this->externalExecutionId($value); } - + public function status($value) { return $this->builder->where('status', 'ilike', '%' . $value . '%'); } - + public function triggerMode($value) { return $this->builder->where('trigger_mode', 'ilike', '%' . $value . '%'); @@ -45,7 +45,7 @@ public function trigger_mode($value) { return $this->triggerMode($value); } - + public function errorMessage($value) { return $this->builder->where('error_message', 'ilike', '%' . $value . '%'); @@ -56,7 +56,7 @@ public function error_message($value) { return $this->errorMessage($value); } - + public function errorNode($value) { return $this->builder->where('error_node', 'ilike', '%' . $value . '%'); @@ -67,7 +67,7 @@ public function error_node($value) { return $this->errorNode($value); } - + public function errorStack($value) { return $this->builder->where('error_stack', 'ilike', '%' . $value . '%'); @@ -78,7 +78,7 @@ public function error_stack($value) { return $this->errorStack($value); } - + public function durationMs($value) { $operator = substr($value, 0, 1); @@ -97,7 +97,7 @@ public function duration_ms($value) { return $this->durationMs($value); } - + public function startedAtStart($date) { return $this->builder->where('started_at', '>=', $date); @@ -222,7 +222,7 @@ public function ipaas_workflow_id($value) { return $this->ipaasWorkflow($value); } - + public function ipaasProviderId($value) { $ipaasProvider = \NextDeveloper\IPAAS\Database\Models\Providers::where('uuid', $value)->first(); @@ -237,7 +237,7 @@ public function ipaas_provider_id($value) { return $this->ipaasProvider($value); } - + public function iamAccountId($value) { $iamAccount = \NextDeveloper\IAM\Database\Models\Accounts::where('uuid', $value)->first(); @@ -247,7 +247,7 @@ public function iamAccountId($value) } } - + // EDIT AFTER HERE - WARNING: ABOVE THIS LINE MAY BE REGENERATED AND YOU MAY LOSE CODE diff --git a/src/Database/Filters/WorkflowsQueryFilter.php b/src/Database/Filters/WorkflowsQueryFilter.php index 52b10d6..f38eb2f 100644 --- a/src/Database/Filters/WorkflowsQueryFilter.php +++ b/src/Database/Filters/WorkflowsQueryFilter.php @@ -17,19 +17,19 @@ class WorkflowsQueryFilter extends AbstractQueryFilter * @var Builder */ protected $builder; - + public function name($value) { return $this->builder->where('name', 'ilike', '%' . $value . '%'); } - + public function description($value) { return $this->builder->where('description', 'ilike', '%' . $value . '%'); } - + public function triggerType($value) { return $this->builder->where('trigger_type', 'ilike', '%' . $value . '%'); @@ -40,13 +40,13 @@ public function trigger_type($value) { return $this->triggerType($value); } - + public function status($value) { return $this->builder->where('status', 'ilike', '%' . $value . '%'); } - + public function externalWorkflowId($value) { return $this->builder->where('external_workflow_id', 'ilike', '%' . $value . '%'); @@ -57,7 +57,7 @@ public function external_workflow_id($value) { return $this->externalWorkflowId($value); } - + public function lastSynchedAtStart($date) { return $this->builder->where('last_synched_at', '>=', $date); @@ -160,7 +160,7 @@ public function ipaas_provider_id($value) { return $this->ipaasProvider($value); } - + public function iamAccountId($value) { $iamAccount = \NextDeveloper\IAM\Database\Models\Accounts::where('uuid', $value)->first(); @@ -170,7 +170,7 @@ public function iamAccountId($value) } } - + public function iamUserId($value) { $iamUser = \NextDeveloper\IAM\Database\Models\Users::where('uuid', $value)->first(); @@ -180,7 +180,7 @@ public function iamUserId($value) } } - + // EDIT AFTER HERE - WARNING: ABOVE THIS LINE MAY BE REGENERATED AND YOU MAY LOSE CODE diff --git a/src/Http/Transformers/AbstractTransformers/AbstractAccountProviderOverviewsTransformer.php b/src/Http/Transformers/AbstractTransformers/AbstractAccountProviderOverviewsTransformer.php index c9c7c29..e79564b 100644 --- a/src/Http/Transformers/AbstractTransformers/AbstractAccountProviderOverviewsTransformer.php +++ b/src/Http/Transformers/AbstractTransformers/AbstractAccountProviderOverviewsTransformer.php @@ -56,7 +56,7 @@ public function transform(AccountProviderOverviews $model) { $iamAccountId = \NextDeveloper\IAM\Database\Models\Accounts::where('id', $model->iam_account_id)->first(); $ipaasProviderId = \NextDeveloper\IPAAS\Database\Models\Providers::where('id', $model->ipaas_provider_id)->first(); - + return $this->buildPayload( [ 'id' => $model->id, diff --git a/src/Http/Transformers/AbstractTransformers/AbstractAccountStatsTransformer.php b/src/Http/Transformers/AbstractTransformers/AbstractAccountStatsTransformer.php index 3aa44e2..8bd9416 100644 --- a/src/Http/Transformers/AbstractTransformers/AbstractAccountStatsTransformer.php +++ b/src/Http/Transformers/AbstractTransformers/AbstractAccountStatsTransformer.php @@ -55,7 +55,7 @@ class AbstractAccountStatsTransformer extends AbstractTransformer public function transform(AccountStats $model) { $iamAccountId = \NextDeveloper\IAM\Database\Models\Accounts::where('id', $model->iam_account_id)->first(); - + return $this->buildPayload( [ 'id' => $model->id, diff --git a/src/Http/Transformers/AbstractTransformers/AbstractAccountsTransformer.php b/src/Http/Transformers/AbstractTransformers/AbstractAccountsTransformer.php index 3f78504..3941cce 100644 --- a/src/Http/Transformers/AbstractTransformers/AbstractAccountsTransformer.php +++ b/src/Http/Transformers/AbstractTransformers/AbstractAccountsTransformer.php @@ -55,7 +55,7 @@ class AbstractAccountsTransformer extends AbstractTransformer public function transform(Accounts $model) { $iamAccountId = \NextDeveloper\IAM\Database\Models\Accounts::where('id', $model->iam_account_id)->first(); - + return $this->buildPayload( [ 'id' => $model->uuid, diff --git a/src/Http/Transformers/AbstractTransformers/AbstractExecutionDailyStatsTransformer.php b/src/Http/Transformers/AbstractTransformers/AbstractExecutionDailyStatsTransformer.php index 0c0accc..f7aed58 100644 --- a/src/Http/Transformers/AbstractTransformers/AbstractExecutionDailyStatsTransformer.php +++ b/src/Http/Transformers/AbstractTransformers/AbstractExecutionDailyStatsTransformer.php @@ -56,7 +56,7 @@ public function transform(ExecutionDailyStats $model) { $iamAccountId = \NextDeveloper\IAM\Database\Models\Accounts::where('id', $model->iam_account_id)->first(); $ipaasProviderId = \NextDeveloper\IPAAS\Database\Models\Providers::where('id', $model->ipaas_provider_id)->first(); - + return $this->buildPayload( [ 'id' => $model->id, diff --git a/src/Http/Transformers/AbstractTransformers/AbstractPlatformHealthPerspectiveTransformer.php b/src/Http/Transformers/AbstractTransformers/AbstractPlatformHealthPerspectiveTransformer.php index c9409bb..365fbd3 100644 --- a/src/Http/Transformers/AbstractTransformers/AbstractPlatformHealthPerspectiveTransformer.php +++ b/src/Http/Transformers/AbstractTransformers/AbstractPlatformHealthPerspectiveTransformer.php @@ -56,7 +56,7 @@ public function transform(PlatformHealthPerspective $model) { $iamAccountId = \NextDeveloper\IAM\Database\Models\Accounts::where('id', $model->iam_account_id)->first(); $ipaasProviderId = \NextDeveloper\IPAAS\Database\Models\Providers::where('id', $model->ipaas_provider_id)->first(); - + return $this->buildPayload( [ 'id' => $model->id, diff --git a/src/Http/Transformers/AbstractTransformers/AbstractProvidersTransformer.php b/src/Http/Transformers/AbstractTransformers/AbstractProvidersTransformer.php index 6520023..4174460 100644 --- a/src/Http/Transformers/AbstractTransformers/AbstractProvidersTransformer.php +++ b/src/Http/Transformers/AbstractTransformers/AbstractProvidersTransformer.php @@ -57,7 +57,7 @@ public function transform(Providers $model) $iaasVirtualMachineId = \NextDeveloper\IAAS\Database\Models\VirtualMachines::where('id', $model->iaas_virtual_machine_id)->first(); $iamAccountId = \NextDeveloper\IAM\Database\Models\Accounts::where('id', $model->iam_account_id)->first(); $iamUserId = \NextDeveloper\IAM\Database\Models\Users::where('id', $model->iam_user_id)->first(); - + return $this->buildPayload( [ 'id' => $model->uuid, diff --git a/src/Http/Transformers/AbstractTransformers/AbstractWorkflowDailyStatsTransformer.php b/src/Http/Transformers/AbstractTransformers/AbstractWorkflowDailyStatsTransformer.php index d27aed5..9c75d36 100644 --- a/src/Http/Transformers/AbstractTransformers/AbstractWorkflowDailyStatsTransformer.php +++ b/src/Http/Transformers/AbstractTransformers/AbstractWorkflowDailyStatsTransformer.php @@ -56,7 +56,7 @@ public function transform(WorkflowDailyStats $model) { $ipaasWorkflowId = \NextDeveloper\IPAAS\Database\Models\Workflows::where('id', $model->ipaas_workflow_id)->first(); $iamAccountId = \NextDeveloper\IAM\Database\Models\Accounts::where('id', $model->iam_account_id)->first(); - + return $this->buildPayload( [ 'id' => $model->uuid, diff --git a/src/Http/Transformers/AbstractTransformers/AbstractWorkflowExecutionsPerspectiveTransformer.php b/src/Http/Transformers/AbstractTransformers/AbstractWorkflowExecutionsPerspectiveTransformer.php index befbd54..f1934f6 100644 --- a/src/Http/Transformers/AbstractTransformers/AbstractWorkflowExecutionsPerspectiveTransformer.php +++ b/src/Http/Transformers/AbstractTransformers/AbstractWorkflowExecutionsPerspectiveTransformer.php @@ -57,7 +57,7 @@ public function transform(WorkflowExecutionsPerspective $model) $ipaasWorkflowId = \NextDeveloper\IPAAS\Database\Models\Workflows::where('id', $model->ipaas_workflow_id)->first(); $ipaasProviderId = \NextDeveloper\IPAAS\Database\Models\Providers::where('id', $model->ipaas_provider_id)->first(); $iamAccountId = \NextDeveloper\IAM\Database\Models\Accounts::where('id', $model->iam_account_id)->first(); - + return $this->buildPayload( [ 'id' => $model->uuid, diff --git a/src/Http/Transformers/AbstractTransformers/AbstractWorkflowExecutionsTransformer.php b/src/Http/Transformers/AbstractTransformers/AbstractWorkflowExecutionsTransformer.php index 8095a61..6b877a2 100644 --- a/src/Http/Transformers/AbstractTransformers/AbstractWorkflowExecutionsTransformer.php +++ b/src/Http/Transformers/AbstractTransformers/AbstractWorkflowExecutionsTransformer.php @@ -57,7 +57,7 @@ public function transform(WorkflowExecutions $model) $ipaasWorkflowId = \NextDeveloper\IPAAS\Database\Models\Workflows::where('id', $model->ipaas_workflow_id)->first(); $ipaasProviderId = \NextDeveloper\IPAAS\Database\Models\Providers::where('id', $model->ipaas_provider_id)->first(); $iamAccountId = \NextDeveloper\IAM\Database\Models\Accounts::where('id', $model->iam_account_id)->first(); - + return $this->buildPayload( [ 'id' => $model->uuid, diff --git a/src/Http/Transformers/AbstractTransformers/AbstractWorkflowsTransformer.php b/src/Http/Transformers/AbstractTransformers/AbstractWorkflowsTransformer.php index 65c4ebd..b642b67 100644 --- a/src/Http/Transformers/AbstractTransformers/AbstractWorkflowsTransformer.php +++ b/src/Http/Transformers/AbstractTransformers/AbstractWorkflowsTransformer.php @@ -57,7 +57,7 @@ public function transform(Workflows $model) $ipaasProviderId = \NextDeveloper\IPAAS\Database\Models\Providers::where('id', $model->ipaas_provider_id)->first(); $iamAccountId = \NextDeveloper\IAM\Database\Models\Accounts::where('id', $model->iam_account_id)->first(); $iamUserId = \NextDeveloper\IAM\Database\Models\Users::where('id', $model->iam_user_id)->first(); - + return $this->buildPayload( [ 'id' => $model->uuid, diff --git a/src/Services/AbstractServices/AbstractAccountProviderOverviewsService.php b/src/Services/AbstractServices/AbstractAccountProviderOverviewsService.php index 95eceeb..4a7bc81 100644 --- a/src/Services/AbstractServices/AbstractAccountProviderOverviewsService.php +++ b/src/Services/AbstractServices/AbstractAccountProviderOverviewsService.php @@ -25,7 +25,7 @@ */ class AbstractAccountProviderOverviewsService { - public static function get(AccountProviderOverviewsQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator + public static function get(?AccountProviderOverviewsQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator { $enablePaginate = array_key_exists('paginate', $params); @@ -190,7 +190,7 @@ public static function create(array $data) $data['iam_account_id'] ); } - + if(!array_key_exists('iam_account_id', $data)) { $data['iam_account_id'] = UserHelper::currentAccount()->id; } @@ -200,7 +200,7 @@ public static function create(array $data) $data['provider_id'] ); } - + try { $model = AccountProviderOverviews::create($data); } catch(\Exception $e) { @@ -258,7 +258,7 @@ public static function update($id, array $data) $data['provider_id'] ); } - + try { $isUpdated = $model->update($data); $model = $model->fresh(); diff --git a/src/Services/AbstractServices/AbstractAccountStatsService.php b/src/Services/AbstractServices/AbstractAccountStatsService.php index 5bc0fc2..34bc7e6 100644 --- a/src/Services/AbstractServices/AbstractAccountStatsService.php +++ b/src/Services/AbstractServices/AbstractAccountStatsService.php @@ -25,7 +25,7 @@ */ class AbstractAccountStatsService { - public static function get(AccountStatsQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator + public static function get(?AccountStatsQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator { $enablePaginate = array_key_exists('paginate', $params); @@ -190,11 +190,11 @@ public static function create(array $data) $data['iam_account_id'] ); } - + if(!array_key_exists('iam_account_id', $data)) { $data['iam_account_id'] = UserHelper::currentAccount()->id; } - + try { $model = AccountStats::create($data); } catch(\Exception $e) { @@ -246,7 +246,7 @@ public static function update($id, array $data) $data['iam_account_id'] ); } - + try { $isUpdated = $model->update($data); $model = $model->fresh(); diff --git a/src/Services/AbstractServices/AbstractAccountsService.php b/src/Services/AbstractServices/AbstractAccountsService.php index 8a74c9b..038fbcd 100644 --- a/src/Services/AbstractServices/AbstractAccountsService.php +++ b/src/Services/AbstractServices/AbstractAccountsService.php @@ -25,7 +25,7 @@ */ class AbstractAccountsService { - public static function get(AccountsQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator + public static function get(?AccountsQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator { $enablePaginate = array_key_exists('paginate', $params); diff --git a/src/Services/AbstractServices/AbstractExecutionDailyStatsService.php b/src/Services/AbstractServices/AbstractExecutionDailyStatsService.php index 6297f6f..da851fc 100644 --- a/src/Services/AbstractServices/AbstractExecutionDailyStatsService.php +++ b/src/Services/AbstractServices/AbstractExecutionDailyStatsService.php @@ -25,7 +25,7 @@ */ class AbstractExecutionDailyStatsService { - public static function get(ExecutionDailyStatsQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator + public static function get(?ExecutionDailyStatsQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator { $enablePaginate = array_key_exists('paginate', $params); @@ -190,7 +190,7 @@ public static function create(array $data) $data['iam_account_id'] ); } - + if(!array_key_exists('iam_account_id', $data)) { $data['iam_account_id'] = UserHelper::currentAccount()->id; } @@ -200,7 +200,7 @@ public static function create(array $data) $data['ipaas_provider_id'] ); } - + try { $model = ExecutionDailyStats::create($data); } catch(\Exception $e) { @@ -258,7 +258,7 @@ public static function update($id, array $data) $data['ipaas_provider_id'] ); } - + try { $isUpdated = $model->update($data); $model = $model->fresh(); diff --git a/src/Services/AbstractServices/AbstractPlatformHealthPerspectiveService.php b/src/Services/AbstractServices/AbstractPlatformHealthPerspectiveService.php index d1b8aa3..24f53a3 100644 --- a/src/Services/AbstractServices/AbstractPlatformHealthPerspectiveService.php +++ b/src/Services/AbstractServices/AbstractPlatformHealthPerspectiveService.php @@ -25,7 +25,7 @@ */ class AbstractPlatformHealthPerspectiveService { - public static function get(PlatformHealthPerspectiveQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator + public static function get(?PlatformHealthPerspectiveQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator { $enablePaginate = array_key_exists('paginate', $params); @@ -190,7 +190,7 @@ public static function create(array $data) $data['iam_account_id'] ); } - + if(!array_key_exists('iam_account_id', $data)) { $data['iam_account_id'] = UserHelper::currentAccount()->id; } @@ -200,7 +200,7 @@ public static function create(array $data) $data['provider_id'] ); } - + try { $model = PlatformHealthPerspective::create($data); } catch(\Exception $e) { @@ -258,7 +258,7 @@ public static function update($id, array $data) $data['provider_id'] ); } - + try { $isUpdated = $model->update($data); $model = $model->fresh(); diff --git a/src/Services/AbstractServices/AbstractProvidersService.php b/src/Services/AbstractServices/AbstractProvidersService.php index 1315f2f..9219268 100644 --- a/src/Services/AbstractServices/AbstractProvidersService.php +++ b/src/Services/AbstractServices/AbstractProvidersService.php @@ -25,7 +25,7 @@ */ class AbstractProvidersService { - public static function get(ProvidersQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator + public static function get(?ProvidersQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator { $enablePaginate = array_key_exists('paginate', $params); @@ -202,7 +202,7 @@ public static function create(array $data) $data['iam_account_id'] ); } - + if(!array_key_exists('iam_account_id', $data)) { $data['iam_account_id'] = UserHelper::currentAccount()->id; } @@ -212,11 +212,11 @@ public static function create(array $data) $data['iam_user_id'] ); } - + if(!array_key_exists('iam_user_id', $data)) { $data['iam_user_id'] = UserHelper::me()->id; } - + try { $model = Providers::create($data); } catch(\Exception $e) { @@ -286,7 +286,7 @@ public static function update($id, array $data) $data['iam_user_id'] ); } - + try { $isUpdated = $model->update($data); $model = $model->fresh(); diff --git a/src/Services/AbstractServices/AbstractWorkflowDailyStatsService.php b/src/Services/AbstractServices/AbstractWorkflowDailyStatsService.php index 7ad14f1..f99bf4e 100644 --- a/src/Services/AbstractServices/AbstractWorkflowDailyStatsService.php +++ b/src/Services/AbstractServices/AbstractWorkflowDailyStatsService.php @@ -25,7 +25,7 @@ */ class AbstractWorkflowDailyStatsService { - public static function get(WorkflowDailyStatsQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator + public static function get(?WorkflowDailyStatsQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator { $enablePaginate = array_key_exists('paginate', $params); @@ -196,11 +196,11 @@ public static function create(array $data) $data['iam_account_id'] ); } - + if(!array_key_exists('iam_account_id', $data)) { $data['iam_account_id'] = UserHelper::currentAccount()->id; } - + try { $model = WorkflowDailyStats::create($data); } catch(\Exception $e) { @@ -258,7 +258,7 @@ public static function update($id, array $data) $data['iam_account_id'] ); } - + try { $isUpdated = $model->update($data); $model = $model->fresh(); diff --git a/src/Services/AbstractServices/AbstractWorkflowExecutionsPerspectiveService.php b/src/Services/AbstractServices/AbstractWorkflowExecutionsPerspectiveService.php index 8b148ab..3b213c3 100644 --- a/src/Services/AbstractServices/AbstractWorkflowExecutionsPerspectiveService.php +++ b/src/Services/AbstractServices/AbstractWorkflowExecutionsPerspectiveService.php @@ -25,7 +25,7 @@ */ class AbstractWorkflowExecutionsPerspectiveService { - public static function get(WorkflowExecutionsPerspectiveQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator + public static function get(?WorkflowExecutionsPerspectiveQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator { $enablePaginate = array_key_exists('paginate', $params); @@ -214,11 +214,11 @@ public static function create(array $data) $data['iam_account_id'] ); } - + if(!array_key_exists('iam_account_id', $data)) { $data['iam_account_id'] = UserHelper::currentAccount()->id; } - + try { $model = WorkflowExecutionsPerspective::create($data); } catch(\Exception $e) { @@ -294,7 +294,7 @@ public static function update($id, array $data) $data['iam_account_id'] ); } - + try { $isUpdated = $model->update($data); $model = $model->fresh(); diff --git a/src/Services/AbstractServices/AbstractWorkflowExecutionsService.php b/src/Services/AbstractServices/AbstractWorkflowExecutionsService.php index d0d55e7..463842c 100644 --- a/src/Services/AbstractServices/AbstractWorkflowExecutionsService.php +++ b/src/Services/AbstractServices/AbstractWorkflowExecutionsService.php @@ -25,7 +25,7 @@ */ class AbstractWorkflowExecutionsService { - public static function get(WorkflowExecutionsQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator + public static function get(?WorkflowExecutionsQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator { $enablePaginate = array_key_exists('paginate', $params); @@ -202,7 +202,7 @@ public static function create(array $data) $data['iam_account_id'] ); } - + if(!array_key_exists('iam_account_id', $data)) { $data['iam_account_id'] = UserHelper::currentAccount()->id; } @@ -218,7 +218,7 @@ public static function create(array $data) $data['retry_of_execution_id'] ); } - + try { $model = WorkflowExecutions::create($data); } catch(\Exception $e) { @@ -294,7 +294,7 @@ public static function update($id, array $data) $data['retry_of_execution_id'] ); } - + try { $isUpdated = $model->update($data); $model = $model->fresh(); diff --git a/src/Services/AbstractServices/AbstractWorkflowsService.php b/src/Services/AbstractServices/AbstractWorkflowsService.php index 02996cb..28defcb 100644 --- a/src/Services/AbstractServices/AbstractWorkflowsService.php +++ b/src/Services/AbstractServices/AbstractWorkflowsService.php @@ -25,7 +25,7 @@ */ class AbstractWorkflowsService { - public static function get(WorkflowsQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator + public static function get(?WorkflowsQueryFilter $filter = null, array $params = []) : Collection|LengthAwarePaginator { $enablePaginate = array_key_exists('paginate', $params); @@ -208,7 +208,7 @@ public static function create(array $data) $data['iam_account_id'] ); } - + if(!array_key_exists('iam_account_id', $data)) { $data['iam_account_id'] = UserHelper::currentAccount()->id; } @@ -218,11 +218,11 @@ public static function create(array $data) $data['iam_user_id'] ); } - + if(!array_key_exists('iam_user_id', $data)) { $data['iam_user_id'] = UserHelper::me()->id; } - + try { $model = Workflows::create($data); } catch(\Exception $e) { @@ -298,7 +298,7 @@ public static function update($id, array $data) $data['iam_user_id'] ); } - + try { $isUpdated = $model->update($data); $model = $model->fresh();