From c93cf8a962f4f279443f38f2a714fb7714184670 Mon Sep 17 00:00:00 2001 From: Ion Bazan Date: Fri, 30 Aug 2019 15:40:25 +0800 Subject: [PATCH] fix style --- .styleci.yml | 1 + .travis.yml | 5 +++++ src/QrPayment.php | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .styleci.yml diff --git a/.styleci.yml b/.styleci.yml new file mode 100644 index 0000000..974f5fa --- /dev/null +++ b/.styleci.yml @@ -0,0 +1 @@ +preset: symfony diff --git a/.travis.yml b/.travis.yml index 45f18a4..9e6e447 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,10 @@ language: php +cache: + directories: + - .phpunit + - $HOME/.composer/cache/files + php: - "7.2" - "7.3" diff --git a/src/QrPayment.php b/src/QrPayment.php index 1cabcbb..30cbed4 100644 --- a/src/QrPayment.php +++ b/src/QrPayment.php @@ -8,6 +8,7 @@ class QrPayment { const DELIMITER = '|'; + const DISALLOWED_CHARS = '/([^A-Za-z0-9 ,\.\/\\\\\-@#&\*\/¹æê³ñ󜟿¥ÆÊ£ÑŹÓŒąćęłńóśźżĄĆĘŁŃŚŻ¯_])/u'; /** @var string|null */ @@ -70,7 +71,7 @@ public function __construct( $this->reserved = $reserved; } - public static function fromQrString(string $qrString): QrPayment + public static function fromQrString(string $qrString): self { $parts = explode(self::DELIMITER, $qrString);