forked from janunger/aqbanking-php
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from grummbeer/cleanup
Cleanup
- Loading branch information
Showing
73 changed files
with
1,350 additions
and
821 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Method AqBanking\\\\AccountMatcher\\:\\:__construct\\(\\) has parameter \\$existingAccounts with no value type specified in iterable type array\\.$#" | ||
count: 1 | ||
path: src/AccountMatcher.php | ||
|
||
- | ||
message: "#^Method AqBanking\\\\Arrayable\\:\\:toArray\\(\\) return type has no value type specified in iterable type array\\.$#" | ||
count: 1 | ||
path: src/Arrayable.php | ||
|
||
- | ||
message: "#^Method AqBanking\\\\Command\\\\ListAccountsCommand\\:\\:execute\\(\\) return type has no value type specified in iterable type array\\.$#" | ||
count: 1 | ||
path: src/Command/ListAccountsCommand.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
includes: | ||
- phpstan-baseline.neon | ||
parameters: | ||
level: 6 | ||
paths: | ||
- src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.5/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
executionOrder="depends,defects" | ||
forceCoversAnnotation="true" | ||
beStrictAboutCoversAnnotation="true" | ||
beStrictAboutOutputDuringTests="true" | ||
beStrictAboutTodoAnnotatedTests="true" | ||
convertDeprecationsToExceptions="true" | ||
verbose="true"> | ||
<testsuites> | ||
<testsuite name="default"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist processUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">src</directory> | ||
</whitelist> | ||
</filter> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="vendor/autoload.php" executionOrder="depends,defects" beStrictAboutOutputDuringTests="true" cacheDirectory=".phpunit.cache" requireCoverageMetadata="true" beStrictAboutCoverageMetadata="true"> | ||
<coverage/> | ||
<testsuites> | ||
<testsuite name="default"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<source> | ||
<include> | ||
<directory suffix=".php">src</directory> | ||
</include> | ||
</source> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,42 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace AqBanking; | ||
|
||
class Account implements AccountInterface, Arrayable | ||
{ | ||
/** | ||
* @var BankCode | ||
*/ | ||
private $bankCode; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $accountNumber; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $accountHolderName; | ||
|
||
/** | ||
* @param string $accountNumber | ||
* @param string $accountHolderName | ||
* @return \AqBanking\Account | ||
*/ | ||
public function __construct(BankCode $bankCode, $accountNumber, $accountHolderName = '') | ||
{ | ||
$this->bankCode = $bankCode; | ||
$this->accountNumber = $accountNumber; | ||
$this->accountHolderName = $accountHolderName; | ||
public function __construct( | ||
private readonly BankCode $bankCode, | ||
private readonly string $accountNumber, | ||
private readonly string $accountHolderName = '', | ||
) { | ||
} | ||
|
||
/** | ||
* @return BankCode | ||
*/ | ||
public function getBankCode() | ||
public function getBankCode(): BankCode | ||
{ | ||
return $this->bankCode; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getAccountNumber() | ||
public function getAccountNumber(): string | ||
{ | ||
return $this->accountNumber; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getAccountHolderName() | ||
public function getAccountHolderName(): string | ||
{ | ||
return $this->accountHolderName; | ||
} | ||
|
||
public function toArray() | ||
/** | ||
* @return array<string, string> | ||
*/ | ||
public function toArray(): array | ||
{ | ||
return [ | ||
'bankCode' => $this->getBankCode()->getString(), | ||
'accountHolderName' => $this->getAccountHolderName(), | ||
'accountNumber' => $this->getAccountNumber(), | ||
'accountHolderName' => $this->getAccountHolderName(), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,14 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace AqBanking; | ||
|
||
interface AccountInterface | ||
{ | ||
/** | ||
* @return BankCode | ||
*/ | ||
public function getBankCode(); | ||
public function getBankCode(): BankCode; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getAccountHolderName(); | ||
public function getAccountHolderName(): string; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getAccountNumber(); | ||
public function getAccountNumber(): string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,5 @@ | |
|
||
interface Arrayable | ||
{ | ||
public function toArray(); | ||
public function toArray(): array; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.