Skip to content

Commit

Permalink
Merge pull request #4 from nchiasson-dgi/fix/add-code-lint-workflow
Browse files Browse the repository at this point in the history
Adding code lint workflow
  • Loading branch information
jordandukart authored Aug 30, 2022
2 parents 116e342 + 6591870 commit 9943a14
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/auto-lint.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion src/DependencyFieldMapGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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] ?? [];
}

}

0 comments on commit 9943a14

Please sign in to comment.