Skip to content

Commit

Permalink
Merge pull request #4 from baraja-core/master
Browse files Browse the repository at this point in the history
Big strict update!
  • Loading branch information
Salamek authored Nov 1, 2020
2 parents f6f400a + 8c61836 commit 9f783a8
Show file tree
Hide file tree
Showing 40 changed files with 2,173 additions and 2,087 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Integrity check

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: 7.4

- name: Install composer deps
run: |
composer create-project nette/code-checker temp/code-checker ^3 --no-progress
composer create-project nette/coding-standard temp/coding-standard ^2 --no-progress
# Install app deps
composer install --no-interaction --prefer-dist
# Check code checker and coding standards
- name: Check coding standards
run: |
php temp/code-checker/code-checker --short-arrays --strict-types --fix --no-progress
php temp/coding-standard/ecs check src --config temp/coding-standard/coding-standard-php71.yml
- name: Check PHPStan rules
run: composer phpstan
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/test/config.json
.idea
/vendor/
Expand Down
43 changes: 19 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
This library provides SOAP and REST API implementations.
Additionaly Branch implementation to fetch and store branch data and label implementation to generate labels.


## Requirements

- PHP 5.4 or higher

## Installation

Install salamek/zasilkovna using [Composer](http://getcomposer.org/)
Expand Down Expand Up @@ -41,25 +36,25 @@ $label = new Label($api, $branch);

// To greate new packet
$transporterPackage = new PacketAttributes(
'ORDERID',
'FirstName',
'LastName',
null,
'addressId',
null,
'Company',
'Email',
'Phone',
null,
null,
null,
'www',
false,
'Street',
'StreetNumber',
'City',
'ZipCode'
);
'ORDERID',
'FirstName',
'LastName',
null,
'addressId',
null,
'Company',
'Email',
'Phone',
null,
null,
null,
'www',
false,
'Street',
'StreetNumber',
'City',
'ZipCode'
);

$api->createPacket($transporterPackage);

Expand Down
70 changes: 44 additions & 26 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,46 @@
{
"name": "salamek/zasilkovna",
"description": "Zasilkovna SOAP and REST client in PHP",
"keywords": [
"Zasilkovna",
"SOAP",
"API",
"REST"
],
"homepage": "https://github.com/Salamek/zasilkovna",
"license": ["LGPL-3.0"],
"authors": [
{
"name": "Adam Schubet",
"homepage": "https://github.com/Salamek/zasilkovna"
}
],
"autoload": {
"classmap": ["src/"]
},
"require": {
"php": ">=5.4.0",
"spatie/array-to-xml": "2.2.1|^2.7.0"
},
"require-dev": {
"phpunit/phpunit": "^5.8"
}
"name": "salamek/zasilkovna",
"description": "Zasilkovna SOAP and REST client in PHP",
"keywords": [
"Zasilkovna",
"SOAP",
"API",
"REST"
],
"homepage": "https://github.com/salamek/zasilkovna",
"license": [
"LGPL-3.0"
],
"authors": [
{
"name": "Adam Schubet",
"homepage": "https://github.com/Salamek/zasilkovna"
},
{
"name": "Jan Barášek",
"homepage": "https://baraja.cz"
}
],
"require": {
"php": ">=7.4.0",
"tecnickcom/tcpdf": "^6.3",
"spatie/array-to-xml": "^2.15"
},
"require-dev": {
"phpstan/phpstan": "^0.12.18",
"tracy/tracy": "^2.7",
"phpstan/phpstan-nette": "^0.12.6",
"symplify/easy-coding-standard": "^7.2"
},
"autoload": {
"classmap": [
"src/"
]
},
"scripts": {
"phpstan": [
"vendor/bin/phpstan analyse src -c phpstan.neon --level 6 --no-progress"
]
},
"minimum-stability": "stable"
}
7 changes: 7 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
includes:
- vendor/phpstan/phpstan-nette/extension.neon
- vendor/phpstan/phpstan-nette/rules.neon

parameters:
ignoreErrors:
- '#Call to an undefined method SoapClient::.+\(\).#'
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
<directory>test</directory>
</testsuite>
</testsuites>
</phpunit>
</phpunit>
Loading

0 comments on commit 9f783a8

Please sign in to comment.