Skip to content

Commit cc11a13

Browse files
committed
PSR12 like reformat
1 parent 05c2ca7 commit cc11a13

28 files changed

Lines changed: 87 additions & 98 deletions

examples/downloadstatement.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
namespace VitexSoftware\Raiffeisenbank;
44

5-
require_once( '../vendor/autoload.php');
5+
require_once('../vendor/autoload.php');
66
$apiInstance = new PremiumAPI\DownloadStatementApi(new ApiClient());
77
$x_ibm_client_id = 'FbboLD2r1WHDRcuKS4wWUbSRHxlDloWL'; // string | ClientID obtained from Developer Portal - when you registered your app with us.
88
$x_request_id = time(); // string | Unique request id provided by consumer application for reference and auditing.
99
$accept_language = 'cs'; // string | The Accept-Language request HTTP header is used to determine document language. Supported languages are `cs` and `en`.
10-
$psu_ip_address = ApiClient::getPublicIP(); // string | IP address of a client - the end IP address of the client application (no server) in IPv4 or IPv6 format.
11-
//If the bank client (your user) uses a browser by which he accesses your server app, we need to know the IP address of his browser.
10+
$psu_ip_address = ApiClient::getPublicIP(); // string | IP address of a client - the end IP address of the client application (no server) in IPv4 or IPv6 format.
11+
//If the bank client (your user) uses a browser by which he accesses your server app, we need to know the IP address of his browser.
1212
//Always provide the closest IP address to the real end-user possible.
1313

1414

examples/getaccounts.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
namespace VitexSoftware\Raiffeisenbank;
44

5-
require_once( '../vendor/autoload.php');
5+
require_once('../vendor/autoload.php');
66
$apiInstance = new PremiumAPI\GetAccountsApi(new ApiClient());
77
$x_ibm_client_id = 'FbboLD2r1WHDRcuKS4wWUbSRHxlDloWL'; // string | ClientID obtained from Developer Portal - when you registered your app with us.
88
$x_request_id = time(); // string | Unique request id provided by consumer application for reference and auditing.
99
$accept_language = 'cs'; // string | The Accept-Language request HTTP header is used to determine document language. Supported languages are `cs` and `en`.
10-
$psu_ip_address = ApiClient::getPublicIP(); // string | IP address of a client - the end IP address of the client application (no server) in IPv4 or IPv6 format.
11-
//If the bank client (your user) uses a browser by which he accesses your server app, we need to know the IP address of his browser.
10+
$psu_ip_address = ApiClient::getPublicIP(); // string | IP address of a client - the end IP address of the client application (no server) in IPv4 or IPv6 format.
11+
//If the bank client (your user) uses a browser by which he accesses your server app, we need to know the IP address of his browser.
1212
//Always provide the closest IP address to the real end-user possible.
1313

1414
$page = 56; // int | Number of the requested page. Default is 1.
@@ -20,4 +20,3 @@
2020
} catch (\Ease\Exception $e) {
2121
echo 'Exception when calling GetAccountsApi->getAccounts: ', $e->getMessage(), PHP_EOL;
2222
}
23-

examples/getstatements.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
namespace VitexSoftware\Raiffeisenbank;
44

5-
require_once( '../vendor/autoload.php');
5+
require_once('../vendor/autoload.php');
66
\Ease\Shared::init([], 'example.env');
77
$x_ibm_client_id = 'FbboLD2r1WHDRcuKS4wWUbSRHxlDloWL'; // string | ClientID obtained from Developer Portal - when you registered your app with us.
88
$x_request_id = time(); // string | Unique request id provided by consumer application for reference and auditing.
99
$accept_language = 'cs'; // string | The Accept-Language request HTTP header is used to determine document language. Supported languages are `cs` and `en`.
10-
$psu_ip_address = ApiClient::getPublicIP(); // string | IP address of a client - the end IP address of the client application (no server) in IPv4 or IPv6 format.
11-
//If the bank client (your user) uses a browser by which he accesses your server app, we need to know the IP address of his browser.
10+
$psu_ip_address = ApiClient::getPublicIP(); // string | IP address of a client - the end IP address of the client application (no server) in IPv4 or IPv6 format.
11+
//If the bank client (your user) uses a browser by which he accesses your server app, we need to know the IP address of his browser.
1212
//Always provide the closest IP address to the real end-user possible.
1313

1414
$request_body = new Model\GetStatementsRequest(['account_number' => '1899297002', 'currency' => 'CZK', 'statementLine' => 'MAIN']);
@@ -76,7 +76,7 @@
7676
< via: kong/2.8.1.1-enterprise-edition
7777
< set-cookie: 00cdf75109dda7379df35556e601cac3=bf1c63b65fd3d882f20faa636a31ad8b; path=/; HttpOnly; Secure; SameSite=None
7878
< X-Correlation-Id: 1682458803
79-
<
79+
<
8080
* Connection #0 to host api.rb.cz left intact
8181
Array
8282
(

examples/gettransactions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace VitexSoftware\Raiffeisenbank;
44

5-
require_once( '../vendor/autoload.php');
5+
require_once('../vendor/autoload.php');
66
$apiInstance = new GetTransactionListApi(new ApiClient());
77
$account_number = '1899297002'; // string | Account number for which to get list of transactions in national format without 0 padding.
88
$currency_code = 'CZK'; // string | Currency code of the account in ISO-4217 standard (e.g. czk, eur, usd)
@@ -12,8 +12,8 @@
1212
$x_ibm_client_id = 'FbboLD2r1WHDRcuKS4wWUbSRHxlDloWL'; // string | ClientID obtained from Developer Portal - when you registered your app with us.
1313
$x_request_id = time(); // string | Unique request id provided by consumer application for reference and auditing.
1414
$accept_language = 'cs'; // string | The Accept-Language request HTTP header is used to determine document language. Supported languages are `cs` and `en`.
15-
$psu_ip_address = ApiClient::getPublicIP(); // string | IP address of a client - the end IP address of the client application (no server) in IPv4 or IPv6 format.
16-
//If the bank client (your user) uses a browser by which he accesses your server app, we need to know the IP address of his browser.
15+
$psu_ip_address = ApiClient::getPublicIP(); // string | IP address of a client - the end IP address of the client application (no server) in IPv4 or IPv6 format.
16+
//If the bank client (your user) uses a browser by which he accesses your server app, we need to know the IP address of his browser.
1717
//Always provide the closest IP address to the real end-user possible.
1818

1919

lib/Configuration.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -484,10 +484,9 @@ public function getHostSettings()
484484
/**
485485
* Returns URL based on host settings, index and variables
486486
*
487-
* @param array $hostsSettings array of host settings, generated from getHostSettings() or equivalent from the API clients
488-
* @param int $hostIndex index of the host settings
489-
* @param array|null $variables hash of variable and the corresponding value (optional)
490-
*
487+
* @param array $hostSettings array of host settings, generated from getHostSettings() or equivalent from the API clients
488+
* @param int $hostIndex index of the host settings
489+
* @param array|null $variables hash of variable and the corresponding value (optional)
491490
* @return string URL based on host settings
492491
*/
493492
public static function getHostString(array $hostsSettings, $hostIndex, array $variables = null)

lib/ObjectSerializer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ public static function serializeCollection(array $collection, $style, $allowColl
402402
* @param mixed $data object or primitive to be deserialized
403403
* @param string $class class name is passed as a string
404404
* @param string[] $httpHeaders HTTP headers
405+
* @param string $discriminator discriminator if polymorphism is used
405406
*
406407
* @return object|array|null a single or an array of $class instances
407408
*/

regenerate.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export PHP_POST_PROCESS_FILE="phpcbf --colors --standard=PSR12 --extensions=php --ignore=vendor/ lib/ examples/ test/"
2+
13
deffile=01rbczpremiumapi.yaml
24

35
rm -rf lib docs test README.md
@@ -20,3 +22,5 @@ sed -i 's/$pSUIPAddress,//' docs/Api/* README.md
2022

2123
sed -i '/IBMClientId/d' docs/Api/*
2224
sed -i '/SUIPAddress/d' docs/Api/*
25+
26+

test/Api/DownloadStatementApiTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* DownloadStatementApiTest
45
* PHP version 7.4
@@ -28,9 +29,9 @@
2829

2930
namespace VitexSoftware\Raiffeisenbank\Test\Api;
3031

31-
use \VitexSoftware\Raiffeisenbank\Configuration;
32-
use \VitexSoftware\Raiffeisenbank\ApiException;
33-
use \VitexSoftware\Raiffeisenbank\ObjectSerializer;
32+
use VitexSoftware\Raiffeisenbank\Configuration;
33+
use VitexSoftware\Raiffeisenbank\ApiException;
34+
use VitexSoftware\Raiffeisenbank\ObjectSerializer;
3435
use PHPUnit\Framework\TestCase;
3536

3637
/**
@@ -43,7 +44,6 @@
4344
*/
4445
class DownloadStatementApiTest extends TestCase
4546
{
46-
4747
/**
4848
* Setup before running any test cases
4949
*/

test/Api/GetAccountBalanceApiTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* GetAccountBalanceApiTest
45
* PHP version 7.4
@@ -28,9 +29,9 @@
2829

2930
namespace VitexSoftware\Raiffeisenbank\Test\Api;
3031

31-
use \VitexSoftware\Raiffeisenbank\Configuration;
32-
use \VitexSoftware\Raiffeisenbank\ApiException;
33-
use \VitexSoftware\Raiffeisenbank\ObjectSerializer;
32+
use VitexSoftware\Raiffeisenbank\Configuration;
33+
use VitexSoftware\Raiffeisenbank\ApiException;
34+
use VitexSoftware\Raiffeisenbank\ObjectSerializer;
3435
use PHPUnit\Framework\TestCase;
3536

3637
/**
@@ -43,7 +44,6 @@
4344
*/
4445
class GetAccountBalanceApiTest extends TestCase
4546
{
46-
4747
/**
4848
* Setup before running any test cases
4949
*/

test/Api/GetAccountsApiTest.php

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,31 @@
88
* @package VitexSoftware\Raiffeisenbank
99
* @author OpenAPI Generator team
1010
* @link https://openapi-generator.tech
11+
*/
12+
13+
/**
14+
* Production
15+
*
16+
* Transaction overview (also for saving accounts). Payments import. Accounts list. Account balance. Before making a call to Premium API, you need to register your app at our _Developer portal_. At _Developer Portal_ you obtain ClientID that your app must send in the request as `X-IBM-Client-Id`. These are your keys that grant your app access to the API. However, this is not enough, for a successful call your app needs to use mTLS. Thus, you not only need _https_ but also a client certificate issued by us. Each bank client/user can issue several certificates. Each certificate can permit different sets of operations (http methods) on different bank accounts. All this must be configured in Internet Banking first by each bank client/user (bank clients need to look under _Settings_ and do not forget to download the certificate at the last step). The certificate is downloaded in **PKCS#12** format as **\\*.p12** file and protected by a password chosen by the bank client/user. Yes, your app needs the password as well to get use of the **\\*p12** file for establishing mTLS connection to the bank. Client certificates issued in Internet Banking for bank clients/users have limited validity (e.g. **5 years**). However, **each year** certificates are automatically blocked and bank client/user must unblock them in Internet Banking. It is possible to do it in advance and prolong the time before the certificate is blocked. Your app should be prepared for these scenarios and it should communicate such cases to your user in advance to provide seamless service and high user-experience of your app. **Note**: Be aware, that in certain error situations, API can return different error structure along with broader set of http status codes, than the one defined below
1117
*
1218
* The version of the OpenAPI document: 1.1.20230222
1319
* Contact: info@vitexsoftware.cz
1420
* Generated by: https://openapi-generator.tech
1521
* OpenAPI Generator version: 6.4.0
1622
*/
1723

24+
/**
25+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26+
* https://openapi-generator.tech
27+
* Please update the test case below to test the endpoint.
28+
*/
29+
1830
namespace VitexSoftware\Raiffeisenbank\Test\Api;
1931

20-
use \PHPUnit\Framework\TestCase,
21-
\VitexSoftware\Raiffeisenbank\ApiClient,
22-
\VitexSoftware\Raiffeisenbank\PremiumAPI\GetAccountsApi;
32+
use VitexSoftware\Raiffeisenbank\Configuration;
33+
use VitexSoftware\Raiffeisenbank\ApiException;
34+
use VitexSoftware\Raiffeisenbank\ObjectSerializer;
35+
use PHPUnit\Framework\TestCase;
2336

2437
/**
2538
* GetAccountsApiTest Class Doc Comment
@@ -31,43 +44,32 @@
3144
*/
3245
class GetAccountsApiTest extends TestCase
3346
{
34-
35-
/**
36-
*
37-
* @var GetAccountsApi
38-
*/
39-
protected $object;
40-
4147
/**
4248
* Setup before running any test cases
4349
*/
4450
public static function setUpBeforeClass(): void
4551
{
46-
4752
}
4853

4954
/**
5055
* Setup before running each test case
5156
*/
5257
public function setUp(): void
5358
{
54-
$this->object = new GetAccountsApi(new ApiClient(['mocking' => true]));
5559
}
5660

5761
/**
5862
* Clean up after running each test case
5963
*/
6064
public function tearDown(): void
6165
{
62-
6366
}
6467

6568
/**
6669
* Clean up after running all test cases
6770
*/
6871
public static function tearDownAfterClass(): void
6972
{
70-
7173
}
7274

7375
/**
@@ -78,7 +80,7 @@ public static function tearDownAfterClass(): void
7880
*/
7981
public function testGetAccounts()
8082
{
81-
$account = $this->object->getAccounts(time());
82-
$this->assertArrayHasKey('accounts', $account);
83+
// TODO: implement
84+
$this->markTestIncomplete('Not implemented');
8385
}
8486
}

0 commit comments

Comments
 (0)