Skip to content

Commit

Permalink
v2 initial working mvp
Browse files Browse the repository at this point in the history
  • Loading branch information
maciej-sz committed Apr 26, 2023
1 parent bc724f4 commit 6024efc
Show file tree
Hide file tree
Showing 78 changed files with 5,062 additions and 13,257 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
vendor/
var/
.idea
tests/php-unit/reports/
tests/php-unit/reports/
.phpunit.result.cache
.deptrac.cache
.php-cs-fixer.cache
37 changes: 37 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude('var')
->exclude('bin')
->exclude('stubs')
->notName('*DEPRECATED_*')
;

return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'array_indentation' => true,
'combine_consecutive_issets' => true,
'concat_space' => ['spacing' => 'one'],
'function_to_constant' => true,
'implode_call' => true,
'is_null' => true,
'method_chaining_indentation' => true,
'modernize_types_casting' => true,
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
'no_superfluous_elseif' => true,
'no_useless_else' => true,
'phpdoc_align' => ['align' => 'left'],
'phpdoc_separation' => false,
'phpdoc_to_comment' => false,
'phpdoc_summary' => false,
'psr_autoloading' => true,
'return_assignment' => true,
'yoda_style' => false,
'no_superfluous_phpdoc_tags' => true,
'single_line_throw' => false,
])
->setFinder($finder)
;
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ language: php
php:
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1
- nightly

install:
- composer install
Expand All @@ -11,5 +15,6 @@ before_script:
- composer update --lock

script:
- ./vendor/bin/behat
- ./vendor/bin/php-cs-fixer --config=./.php-cs-fixer.dist.php fix --dry-run --diff --allow-risky=yes
- ./vendor/bin/phpstan
- ./vendor/bin/phpunit
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 maciej-sz
Copyright (c) 2015-2023 maciej-sz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 0 additions & 5 deletions behat.yml.dist

This file was deleted.

40 changes: 25 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "maciej-sz/nbp-php",
"description": "API for accessing NBP (Narodowy Bank Polski) currency rates in PHP",
"keywords": ["nbp", "currency", "money"],
"description": "API for accessing Polish National Bank (NBP - Narodowy Bank Polski) currency and commodities rates",
"keywords": ["nbp", "currency", "money", "commodity", "gold", "exchange", "rate", "rates"],
"type": "library",
"license": "MIT",
"authors": [
Expand All @@ -11,24 +11,34 @@
}
],
"autoload": {
"psr-0": {
"MaciejSz\\NbpPhp\\": "src/",
"MaciejSzUt\\NbpPhp\\": "tests/php-unit/src/",
"MaciejSzAt\\NbpPhp\\": "tests/behat/src/"
"psr-4": {
"MaciejSz\\Nbp\\": "src/"
}
},
"require-dev": {
"php": ">=7.2",
"behat/behat": "^3.4",
"behat/mink": "^1.7",
"doctrine/cache": "~1.6.2",
"guzzlehttp/guzzle": "^6.3",
"phpunit/phpunit": "^8.1"
"autoload-dev": {
"psr-4": {
"MaciejSz\\Nbp\\Test\\Unit\\": "tests/unit/",
"MaciejSz\\Nbp\\Test\\Functional\\": "tests/functional/",
"MaciejSz\\Nbp\\Test\\Integration\\": "tests/integration/",
"MaciejSz\\Nbp\\Test\\Fixtures\\": "tests/fixtures/src/"
}
},
"require": {
"php": ">=7.0.0"
"php": ">=7.2||^8.0",
"ext-json": "*"
},
"require-dev": {
"doctrine/cache": "^2.2",
"guzzlehttp/guzzle": "^6.3",
"phpunit/phpunit": "^9.6",
"qossmic/deptrac-shim": "^1.0",
"friendsofphp/php-cs-fixer": "^3.16",
"phpstan/phpstan": "^1.10",
"symfony/http-client": "^6.2",
"donatj/mock-webserver": "^2.6"
},
"suggest": {
"doctrine/cache": "Allows local cache"
"doctrine/cache": "Allows local cache",
"symfony/http-foundation": "Symfony HTTP Transport layer"
}
}
Loading

0 comments on commit 6024efc

Please sign in to comment.