diff --git a/src/Api/Projects.php b/src/Api/Projects.php index 32aa168a..d4501db2 100644 --- a/src/Api/Projects.php +++ b/src/Api/Projects.php @@ -349,11 +349,7 @@ public function pipelineTestReportSummary(int|string $project_id, int $pipeline_ */ public function createPipeline(int|string $project_id, string $commit_ref, ?array $variables = null): mixed { - $parameters = []; - - if (null !== $variables) { - $parameters['variables'] = $variables; - } + $parameters = $variables ?? []; return $this->post($this->getProjectPath($project_id, 'pipeline'), $parameters, [], [], [ 'ref' => $commit_ref,