Skip to content

Commit

Permalink
Fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
evansims committed Jan 9, 2024
1 parent 2821db4 commit ba56f67
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 41 deletions.
76 changes: 37 additions & 39 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.sha || github.ref }}

- id: set-matrix
run: echo "matrix=$(jq -c . < ./.github/workflows/matrix.json)" >> $GITHUB_OUTPUT
Expand All @@ -52,7 +52,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.sha || github.ref }}

- uses: ./.github/actions/setup
with:
Expand All @@ -70,7 +70,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.sha || github.ref }}

- uses: ./.github/actions/setup
with:
Expand All @@ -86,47 +86,45 @@ jobs:
# directory: ./coverage/
# flags: unittestsvalidate

# TODO: Fix PHPStan tests
# phpstan:
# name: PHPStan
# needs: [configure, prepare]
# runs-on: ubuntu-latest
phpstan:
name: PHPStan
needs: [configure, prepare]
runs-on: ubuntu-latest

# strategy:
# fail-fast: false
# matrix: ${{ fromJson(needs.configure.outputs.matrix) }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.configure.outputs.matrix) }}

# steps:
# - uses: actions/checkout@v4
# with:
# ref: ${{ github.event.pull_request.merge_commit_sha || github.ref }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha || github.ref }}

# - uses: ./.github/actions/setup
# with:
# php: ${{ matrix.php }}
- uses: ./.github/actions/setup
with:
php: ${{ matrix.php }}

# - run: composer phpstan
- run: composer phpstan

# TODO: Fix Psalm tests
# psalm:
# name: Psalm
# needs: [configure, prepare]
# runs-on: ubuntu-latest
psalm:
name: Psalm
needs: [configure, prepare]
runs-on: ubuntu-latest

# strategy:
# fail-fast: false
# matrix: ${{ fromJson(needs.configure.outputs.matrix) }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.configure.outputs.matrix) }}

# steps:
# - uses: actions/checkout@v4
# with:
# ref: ${{ github.event.pull_request.merge_commit_sha || github.ref }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha || github.ref }}

# - uses: ./.github/actions/setup
# with:
# php: ${{ matrix.php }}
- uses: ./.github/actions/setup
with:
php: ${{ matrix.php }}

# - run: composer psalm
- run: composer psalm

rector:
name: Rector
Expand All @@ -136,7 +134,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.sha || github.ref }}

- uses: ./.github/actions/setup
with:
Expand All @@ -152,7 +150,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.sha || github.ref }}

- uses: ./.github/actions/setup
with:
Expand All @@ -168,7 +166,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.sha || github.ref }}

- uses: ./.github/actions/setup
with:
Expand All @@ -184,7 +182,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.sha || github.ref }}

- uses: ./.github/actions/setup
with:
Expand Down
1 change: 1 addition & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ parameters:
- '#Casting to string something that(.*) already string.#'
- '#\$object_or_class of function method_exists expects object\|string, (.*) given.#'
- '#Property (.*) is never read, only written.#'
- '#Constructor of class (.*) has an unused parameter (.*).#'
- '#Call to function is_string\(\) with string will always evaluate to true.$#'
-
message: '#Parameter \#3 \$(.*) of function openssl_verify expects (.*), (.*) given.#'
Expand Down
2 changes: 1 addition & 1 deletion src/Controllers/AuthenticationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct(
private RouterInterface $router,
ContainerInterface $container,
) {
$this->setContainer($container);
$this->container = $container;
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/Controllers/BackchannelLogoutController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ final class BackchannelLogoutController extends AbstractController implements Au
{
public function __construct(
private Authenticator $authenticator,
protected ContainerInterface $container,
ContainerInterface $container,
) {
$this->container = $container;
}

/**
Expand Down

0 comments on commit ba56f67

Please sign in to comment.