Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ecd373
commit 6746245
Showing
31 changed files
with
1,435 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
.gitattributes export-ignore | ||
.github export-ignore | ||
.gitignore export-ignore | ||
.github/ export-ignore | ||
tests/ export-ignore | ||
phpunit.xml export-ignore | ||
phpstan-baseline.neon export-ignore | ||
phpstan.neon export-ignore | ||
psalm.xml export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: release-please | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
update_release_draft: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- uses: google-github-actions/release-please-action@v2 | ||
with: | ||
release-type: php | ||
bump-minor-pre-major: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: static analysis | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
phpstan: | ||
name: PHPStan | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
strategy: | ||
matrix: | ||
php-version: [8.1] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
coverage: none | ||
extensions: mbstring | ||
tools: composer | ||
|
||
- name: Download dependencies | ||
run: composer update --no-interaction --no-progress | ||
|
||
- name: Download PHPStan | ||
run: composer bin phpstan require phpstan/phpstan | ||
|
||
- name: Execute PHPStan | ||
run: vendor/bin/phpstan analyze --no-progress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
laravel-tests: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
strategy: | ||
matrix: | ||
php-version: [8.1] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
coverage: pcov | ||
|
||
- name: Install PHP dependencies | ||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | ||
|
||
- name: Run PHPUnit | ||
run: vendor/bin/phpunit --coverage-clover=coverage.xml | ||
|
||
- name: Upload coverage to codecov | ||
uses: codecov/codecov-action@v2 | ||
continue-on-error: true | ||
with: | ||
files: ./coverage.xml | ||
|
||
- name: Upload coverage to codeclimate | ||
uses: paambaati/codeclimate-action@v3.0.0 | ||
continue-on-error: true | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_TOKEN }} | ||
with: | ||
coverageCommand: '' | ||
coverageLocations: ./coverage.xml:clover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/vendor/ | ||
/vendor-bin/ | ||
node_modules/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# Laravel 4 specific | ||
bootstrap/compiled.php | ||
app/storage/ | ||
|
||
# Laravel 5 & Lumen specific | ||
public/storage | ||
public/hot | ||
|
||
# Laravel 5 & Lumen specific with changed public path | ||
public_html/storage | ||
public_html/hot | ||
|
||
storage/*.key | ||
.env | ||
Homestead.yaml | ||
Homestead.json | ||
/.vagrant | ||
.phpunit.result.cache | ||
composer.lock | ||
|
||
*.p12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# union-bank-api-client | ||
|
||
[![Latest Stable Version](https://img.shields.io/github/v/release/brokeyourbike/union-bank-api-client-php)](https://github.com/brokeyourbike/union-bank-api-client-php/releases) | ||
[![Total Downloads](https://poser.pugx.org/brokeyourbike/union-bank-api-client-php/downloads)](https://packagist.org/packages/brokeyourbike/union-bank-api-client-php) | ||
[![License: MPL-2.0](https://img.shields.io/badge/license-MPL--2.0-purple.svg)](https://github.com/brokeyourbike/union-bank-api-client-php/blob/main/LICENSE) | ||
[![tests](https://github.com/brokeyourbike/union-bank-api-client-php/actions/workflows/tests.yml/badge.svg)](https://github.com/brokeyourbike/union-bank-api-client-php/actions/workflows/tests.yml) | ||
[![Maintainability](https://api.codeclimate.com/v1/badges/763d6f7cfcf9c1c43056/maintainability)](https://codeclimate.com/github/brokeyourbike/union-bank-api-client-php/maintainability) | ||
[![Test Coverage](https://api.codeclimate.com/v1/badges/763d6f7cfcf9c1c43056/test_coverage)](https://codeclimate.com/github/brokeyourbike/union-bank-api-client-php/test_coverage) | ||
|
||
Union Bank API Client for PHP | ||
|
||
## Installation | ||
|
||
```bash | ||
composer require brokeyourbike/union-bank-api-client | ||
``` | ||
|
||
## Usage | ||
|
||
```php | ||
use BrokeYourBike\UnionBank\Client; | ||
use BrokeYourBike\UnionBank\Interfaces\ConfigInterface; | ||
|
||
assert($config instanceof ConfigInterface); | ||
assert($httpClient instanceof \GuzzleHttp\ClientInterface); | ||
|
||
$apiClient = new Client($config, $httpClient); | ||
$apiClient->generateToken(); | ||
``` | ||
|
||
## Authors | ||
|
||
- [Ivan Stasiuk](https://github.com/brokeyourbike) | [Twitter](https://twitter.com/brokeyourbike) | [stasi.uk](https://stasi.uk) | ||
|
||
## License | ||
[Mozilla Public License v2.0](https://github.com/brokeyourbike/union-bank-api-client-php/blob/main/LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"name": "brokeyourbike/union-bank-api-client", | ||
"description": "Union Bank API Client for PHP", | ||
"type": "library", | ||
"license": "MPL-2.0", | ||
"keywords": [ | ||
"api", | ||
"api-client", | ||
"union-bank", | ||
"brokeyourbike" | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"BrokeYourBike\\UnionBank\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"BrokeYourBike\\UnionBank\\Tests\\": "tests/" | ||
} | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "Ivan Stasiuk", | ||
"email": "ivan@stasi.uk", | ||
"homepage": "https://stasi.uk" | ||
} | ||
], | ||
"minimum-stability": "stable", | ||
"require": { | ||
"php": "^8.1", | ||
"brokeyourbike/http-client": "^1.0", | ||
"brokeyourbike/resolve-uri": "^1.0", | ||
"brokeyourbike/http-enums": "^2.0", | ||
"brokeyourbike/data-transfer-object": "^0.2", | ||
"psr/simple-cache": "^3.0" | ||
}, | ||
"require-dev": { | ||
"bamarni/composer-bin-plugin": "^1.4", | ||
"phpunit/phpunit": "^9.5", | ||
"mockery/mockery": "^1.4", | ||
"nesbot/carbon": "^2", | ||
"larapack/dd": "^1.1" | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"bamarni/composer-bin-plugin": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
parameters: | ||
checkMissingIterableValueType: false | ||
checkGenericClassInNonGenericObjectType: false | ||
level: max | ||
paths: | ||
- src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<phpunit | ||
colors="true" | ||
beStrictAboutOutputDuringTests="true" | ||
beStrictAboutTestsThatDoNotTestAnything="true" | ||
bootstrap="vendor/autoload.php" | ||
> | ||
<testsuites> | ||
<testsuite name="Tests"> | ||
<directory suffix=".php">./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<coverage> | ||
<include> | ||
<directory suffix=".php">src</directory> | ||
</include> | ||
</coverage> | ||
</phpunit> |
Oops, something went wrong.