Skip to content

Commit 2f84b48

Browse files
committed
Initial commit
0 parents  commit 2f84b48

File tree

9 files changed

+187
-0
lines changed

9 files changed

+187
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
tab_width = 4
10+
trim_trailing_whitespace = true
11+
12+
[manifest/*.json]
13+
indent_size = 2

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/tests export-ignore
2+
/.github export-ignore
3+
/.gitattributes export-ignore
4+
/.gitignore export-ignore
5+
/phpstan.neon export-ignore
6+
/phpunit.xml.dist export-ignore

.github/workflows/ci.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
check_composer:
9+
name: Check composer.json
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: shivammathur/setup-php@v2
14+
with:
15+
coverage: none
16+
php-version: '8.1'
17+
- run: composer validate --strict --no-check-lock
18+
19+
static_analysis:
20+
name: Static analysis
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v3
24+
- uses: shivammathur/setup-php@v2
25+
with:
26+
coverage: none
27+
php-version: '8.1'
28+
- name: Install dependencies
29+
run: composer update --ansi --no-progress --prefer-dist --no-interaction
30+
- run: vendor/bin/phpstan analyze
31+
32+
tests:
33+
name: "Tests on PHP ${{ matrix.php }}${{ matrix.name_suffix }}"
34+
runs-on: ubuntu-latest
35+
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
php: [ '8.1', '8.2' ]
40+
min_stability: [ '' ]
41+
name_suffix: [ '' ]
42+
composer_flags: [ '' ]
43+
include:
44+
- php: '8.2'
45+
min_stability: 'dev'
46+
name_suffix: ' (dev deps)'
47+
- php: '8.1'
48+
min_stability: ''
49+
name_suffix: ' (lowest deps)'
50+
composer_flags: '--prefer-lowest'
51+
52+
steps:
53+
- uses: actions/checkout@v3
54+
- uses: shivammathur/setup-php@v2
55+
with:
56+
coverage: "none"
57+
php-version: "${{ matrix.php }}"
58+
59+
- name: Configure stability
60+
if: "matrix.min_stability != ''"
61+
run: composer config minimum-stability "${{ matrix.min_stability }}"
62+
63+
- name: Install dependencies
64+
run: composer update --ansi --no-progress --prefer-dist --no-interaction ${{ matrix.composer_flags }}
65+
66+
- name: Run tests
67+
run: vendor/bin/phpunit -v --colors=always

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/vendor/
2+
/composer.lock
3+
*.cache

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2023-present Incenteev
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Async Amazon Incentives
2+
=======================
3+
4+
## Installation
5+
6+
Use [Composer](https://getcomposer.org) to install the library:
7+
8+
```bash
9+
$ composer require incenteev/async-amazon-incentives
10+
```
11+
12+
## Usage
13+
14+
15+
## License
16+
17+
This package is under the [MIT license](LICENSE).
18+
19+
## Reporting an issue or a feature request
20+
21+
Issues and feature requests are tracked in the [Github issue tracker](https://github.com/Incenteev/async-amazon-incentives/issues).

composer.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "incenteev/async-amazon-incentives",
3+
"description": "SDK for the Amazon Incentives API based on the structure of the async-aws project",
4+
"license": "MIT",
5+
"keywords": ["AmazonGiftCode", "Amazon", "GiftCard", "AGCOD", "Incentives API", "Amazon Incentives API"],
6+
"require": {
7+
"php": "^8.1"
8+
},
9+
"require-dev": {
10+
"phpstan/phpstan": "^1.10",
11+
"phpstan/phpstan-deprecation-rules": "^1.1",
12+
"phpstan/phpstan-phpunit": "^1.3",
13+
"phpunit/phpunit": "^10.2"
14+
},
15+
"autoload": {
16+
"psr-4": {
17+
"Incenteev\\AsyncAmazonIncentives\\": "src/"
18+
}
19+
},
20+
"autoload-dev": {
21+
"psr-4": {
22+
"Incenteev\\AsyncAmazonIncentives\\Tests\\": "tests/"
23+
}
24+
},
25+
"authors": [
26+
{
27+
"name": "Christophe Coevoet",
28+
"email": "stof@notk.org"
29+
}
30+
],
31+
"config": {
32+
"sort-packages": true
33+
}
34+
}

phpstan.neon

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
parameters:
2+
level: max
3+
paths:
4+
- src/
5+
- tests/
6+
7+
includes:
8+
- phar://phpstan.phar/conf/bleedingEdge.neon
9+
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
10+
- vendor/phpstan/phpstan-phpunit/extension.neon
11+
- vendor/phpstan/phpstan-phpunit/rules.neon

phpunit.xml.dist

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" bootstrap="./vendor/autoload.php" colors="true">
3+
<source>
4+
<include>
5+
<directory>./src</directory>
6+
</include>
7+
</source>
8+
<testsuites>
9+
<testsuite name="Async Amazon Incentives tests">
10+
<directory>./tests</directory>
11+
</testsuite>
12+
</testsuites>
13+
</phpunit>

0 commit comments

Comments
 (0)