Skip to content

Commit 3a78884

Browse files
committed
first commit
0 parents  commit 3a78884

17 files changed

+402
-0
lines changed

.coveralls.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
service_name: travis-ci
2+
coverage_clover: build/clover.xml
3+
json_path: build/coveralls.json

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore all test and documentation with "export-ignore".
5+
/.gitattributes export-ignore
6+
/.gitignore export-ignore
7+
/.travis.yml export-ignore
8+
/phpunit.xml.dist export-ignore
9+
/.scrutinizer.yml export-ignore
10+
/tests export-ignore

.github/workflows/tests.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
php: [7.4,]
12+
laravel: [7.*]
13+
dependency-version: [prefer-lowest, prefer-stable]
14+
include:
15+
- laravel: 7.*
16+
testbench: 5.*
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v1
20+
21+
- name: Cache dependencies
22+
uses: actions/cache@v1
23+
with:
24+
path: ~/.composer/cache/files
25+
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
26+
27+
- name: Setup PHP
28+
uses: shivammathur/setup-php@v1
29+
with:
30+
php-version: ${{ matrix.php }}
31+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
32+
coverage: none
33+
34+
- name: Install dependencies
35+
run: |
36+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
37+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
38+
39+
- name: Execute tests
40+
run: vendor/bin/phpunit

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
build
2+
composer.lock
3+
vendor
4+
html
5+
build
6+
coverage.clover

.php_cs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
3+
$finder = Symfony\Component\Finder\Finder::create()
4+
->notPath('bootstrap/*')
5+
->notPath('storage/*')
6+
->notPath('vendor')
7+
->in([
8+
__DIR__ . '/src',
9+
__DIR__ . '/tests'
10+
])
11+
->name('*.php')
12+
->notName('*.blade.php')
13+
->ignoreDotFiles(true)
14+
->ignoreVCS(true);
15+
16+
return PhpCsFixer\Config::create()
17+
->setRules([
18+
'@PSR2' => true,
19+
'array_syntax' => ['syntax' => 'short'],
20+
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
21+
'no_unused_imports' => true,
22+
'not_operator_with_successor_space' => true,
23+
'trailing_comma_in_multiline_array' => true,
24+
'phpdoc_scalar' => true,
25+
'unary_operator_spaces' => true,
26+
'binary_operator_spaces' => true,
27+
'blank_line_before_statement' => [
28+
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
29+
],
30+
'phpdoc_single_line_var_spacing' => true,
31+
'phpdoc_var_without_name' => true,
32+
'class_attributes_separation' => [
33+
'elements' => [
34+
'method', 'property',
35+
],
36+
],
37+
'method_argument_space' => [
38+
'on_multiline' => 'ensure_fully_multiline',
39+
'keep_multiple_spaces_after_comma' => true,
40+
]
41+
])
42+
->setFinder($finder);

.styleci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
preset: laravel
2+
3+
disabled:
4+
- single_class_element_per_statement
5+
- self_accessor
6+
7+
finder:
8+
exclude:
9+
- "tests/stubs"

changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
4+
## Version 0.0.1
5+
6+
### Added
7+
- ``` BNR::exchange('currency','date')``` - return exchange rate for selected currency and date at NBR (National Bank of Romania)

composer.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "andalisolutions/laravel-bnr",
3+
"description": "Web service for verifying taxpayers who are registered according to art. 316 of the Romanian Fiscal Code",
4+
"license": "MIT",
5+
"authors": [
6+
{
7+
"name": "Andrei Ciungulete",
8+
"email": "[email protected]",
9+
"homepage": "http://www.andali.ro",
10+
"role" : "developer"
11+
}
12+
],
13+
"homepage": "https://github.com/andalisolutions/laravel-bnr",
14+
"keywords": ["Laravel", "Laravel BNR", "BNR"],
15+
"require": {
16+
"illuminate/support": "^7.0",
17+
"ext-json" : "*",
18+
"guzzlehttp/guzzle": "^6.5",
19+
"orchestra/parser": "^5.0",
20+
"friendsofphp/php-cs-fixer": "^2.16"
21+
},
22+
"require-dev": {
23+
"mockery/mockery": "^1.0",
24+
"orchestra/testbench": "^5.0"
25+
},
26+
"autoload": {
27+
"psr-4": {
28+
"Andali\\Bnr\\": "src/"
29+
}
30+
},
31+
"autoload-dev": {
32+
"psr-4": {
33+
"Andali\\Bnr\\Tests\\": "tests"
34+
}
35+
},
36+
"extra": {
37+
"laravel": {
38+
"providers": [
39+
"Andali\\Bnr\\BnrServiceProvider"
40+
],
41+
"aliases": {
42+
"Bnr": "Andali\\Bnr\\Facades\\Bnr"
43+
}
44+
}
45+
}
46+
}

contributing.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Contributing
2+
3+
Contributions are welcome and will be fully credited.
4+
5+
Contributions are accepted via Pull Requests on [Github](https://github.com/andalisolutions/laravel-anaf).
6+
7+
## Pull Requests
8+
9+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
10+
11+
- **Document any change in behaviour** - Make sure the `readme.md` and any other relevant documentation are kept up-to-date.
12+
13+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
14+
15+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
16+
17+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
18+
19+
20+
**Happy coding**!

license.md

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

0 commit comments

Comments
 (0)