Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [staabm]
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Dependabot config reference
# https://help.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: composer
directory: /
versioning-strategy: increase
schedule:
interval: monthly

- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
29 changes: 29 additions & 0 deletions .github/workflows/php-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: PHP Linter

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
php-linter:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false

steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: ${{ github.event.client_payload.pull_request.head.ref }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none
tools: parallel-lint

- name: Lint PHP
run: composer exec --no-interaction -- parallel-lint bin/ lib/ tests/
45 changes: 45 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Unit tests

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
phpunit:
runs-on: ${{ matrix.os }}

strategy:
matrix:
include:
- os: ubuntu-latest
php-version: '7.4'
- os: ubuntu-latest
php-version: '8.0'
- os: ubuntu-latest
php-version: '8.1'
- os: ubuntu-latest
php-version: '8.2'

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: none # disable xdebug, pcov

- name: Composer install
uses: ramsey/composer-install@v3
with:
composer-options: '--ansi --prefer-dist'

- name: Setup Problem Matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Run unit tests
run: vendor/bin/phpunit --colors=always
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
bundles/*
!bundles/.

.idea
.idea
.phpunit.result.cache
4 changes: 2 additions & 2 deletions src/AbstractPasswordExposedChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function isExposedByHash(string $hash): ?bool
}

/**
* @param $hash
* @param string $hash
*
* @throws \Psr\Http\Client\ClientExceptionInterface
*
Expand All @@ -121,7 +121,7 @@ protected function makeRequest(string $hash): ResponseInterface
}

/**
* @param $string
* @param string $string
*
* @return string
*/
Expand Down