diff --git a/.github/workflows/auto-lint.yml b/.github/workflows/auto-lint.yml new file mode 100644 index 0000000..57a5b53 --- /dev/null +++ b/.github/workflows/auto-lint.yml @@ -0,0 +1,14 @@ +name: Code Linting +on: + pull_request: + branches: + - main + +jobs: + Lint: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v2 + - name: Run CodeSniffer + uses: discoverygarden/CodeSniffer@v1 diff --git a/src/DependencyFieldMapGenerator.php b/src/DependencyFieldMapGenerator.php index 242cbf6..33ffbff 100644 --- a/src/DependencyFieldMapGenerator.php +++ b/src/DependencyFieldMapGenerator.php @@ -115,7 +115,7 @@ public function getReferentialFieldMap() { */ public function getReferencingFields($entity_type_id) { $map = $this->getReferentialFieldMap(); - return isset($map[$entity_type_id]) ? $map[$entity_type_id] : []; + return $map[$entity_type_id] ?? []; } }