Skip to content

Commit

Permalink
- basename return different results based on OS. Switched to substr w…
Browse files Browse the repository at this point in the history
…ith str_pos.

- Added default TransactionMode for value 0.
  • Loading branch information
firebed committed Feb 27, 2024
1 parent 58163c8 commit 55b21ac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ Please see [CONTRIBUTING](http://docs.invoicemaker.gr/contributing) for details.

### Licence

<p>AADE myDATA is licenced under the <a href="https://opensource.org/licenses/MIT">MIT License</a>.</p>
AADE myDATA is licenced under the [MIT License](LICENSE.md).

<p>Copyright 2022 Okan Giritli</p>
Copyright 2022 &copy; Okan Giritli
5 changes: 5 additions & 0 deletions src/Enums/TransactionMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

enum TransactionMode: int
{
/**
* Αποδοχή του παραστατικού
*/
case ACCEPT = 0;

/**
* Απόρριψη του παραστατικού λόγω διαφωνίας
*/
Expand Down
5 changes: 4 additions & 1 deletion src/Http/MyDataRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ private function getUrl(): string

private function getAction(): string
{
return $this->action ?? (basename(get_class($this)));
$action = get_class($this);
$action = substr($action, strrpos($action, '\\') + 1);

return $this->action ?? $action;
}
}

0 comments on commit 55b21ac

Please sign in to comment.