From 2b4efc5d6d260816f0eaaa740597eb3dd03947af Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 2 Oct 2024 17:54:15 -0700 Subject: [PATCH] chore: fix misc cs-fixer issues --- .github/workflows/code-standards.yml | 2 +- src/Utils/Actions/RunCsFixerCommand.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code-standards.yml b/.github/workflows/code-standards.yml index dce7ca4..e507895 100644 --- a/.github/workflows/code-standards.yml +++ b/.github/workflows/code-standards.yml @@ -88,7 +88,7 @@ jobs: "from the root of your ${{ github.repository }} repo:" echo "" echo " composer global require google/cloud-tools" - echo " ~/.composer/vendor/bin/php-tools cs-fixer ${{ github.repository }} --ref ${{ github.ref_name }}" + echo " ~/.composer/vendor/bin/php-tools cs-fixer ${{ github.repository }} --ref ${{ github.head_ref || github.ref_name }}" echo "" exit 1 fi diff --git a/src/Utils/Actions/RunCsFixerCommand.php b/src/Utils/Actions/RunCsFixerCommand.php index 9beb62f..26ab37b 100644 --- a/src/Utils/Actions/RunCsFixerCommand.php +++ b/src/Utils/Actions/RunCsFixerCommand.php @@ -106,7 +106,7 @@ protected function execute(InputInterface $input, OutputInterface $output) foreach ($defaultWorkflow['on']['workflow_call']['inputs'] as $name => $inputOptions) { $defaults[$name] = $inputOptions['default'] ?? ''; } - $options = array_merge($defaults, $job['with']); + $options = array_merge($defaults, $job['with'] ?? []); if (str_starts_with($options['config'], 'GoogleCloudPlatform/php-tools/')) { // use local file