diff --git a/readme.md b/readme.md index 246b887..4291277 100644 --- a/readme.md +++ b/readme.md @@ -1,12 +1,14 @@ # GPWebPay Core library -[![Build Status](https://travis-ci.org/Pixidos/gpwebpay-core.svg?branch=master)](https://travis-ci.org/Pixidos/gpwebpay-core) -[![Donwloads](https://poser.pugx.org/pixidos/gpwebpay-core/downloads)](https://packagist.org/packages/pixidos/gpwebpay-core) -[![Latest stable](https://img.shields.io/packagist/v/pixidos/gpwebpay-core.svg)](https://packagist.org/packages/pixidos/gpwebpay-core) ![](https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat) +[![Code Analyse Actions Status](https://github.com/Pixidos/gpwebpay-core/workflows/Code%20Analyse/badge.svg?branch=master)](https://github.com/Pixidos/gpwebpay-core/actions) +[![UnitTests Actions Status](https://github.com/Pixidos/gpwebpay-core/workflows/Unit%20Tests/badge.svg?branch=master)](https://github.com/Pixidos/gpwebpay-core/actions) [![Code coverage](https://codecov.io/gh/Pixidos/gpwebpay-core/branch/master/graph/badge.svg)](https://codecov.io/gh/Pixidos/gpwebpay-core) -[![Documentation Status](https://readthedocs.org/projects/gpwebpay-core/badge/?version=latest)](https://gpwebpay-core.readthedocs.io/en/latest/?badge=latest) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Pixidos/gpwebpay-core/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Pixidos/gpwebpay-core/?branch=master) +[![Documentation Status](https://readthedocs.org/projects/gpwebpay-core/badge/?version=latest)](https://gpwebpay-core.readthedocs.io/en/latest/?badge=latest) +[![Donwloads](https://poser.pugx.org/pixidos/gpwebpay-core/downloads)](https://packagist.org/packages/pixidos/gpwebpay-core) +[![Latest stable](https://img.shields.io/packagist/v/pixidos/gpwebpay-core.svg)](https://packagist.org/packages/pixidos/gpwebpay-core) +![](https://img.shields.io/badge/php-7.2%20to%208.0-777bb3.svg?logo=php&logoColor=white&labelColor=555555%22) GPWebPay Core is library for [GPWebPay service](http://www.gpwebpay.cz/ ) HTTP API diff --git a/src/Factory/ResponseFactory.php b/src/Factory/ResponseFactory.php index 2e25549..731e534 100644 --- a/src/Factory/ResponseFactory.php +++ b/src/Factory/ResponseFactory.php @@ -93,7 +93,7 @@ private function getStringValue(string $name, array &$params, string $defaultVal unset($params[$name]); } - return (string)$value; + return $value; } /** diff --git a/src/Param/OrderNumber.php b/src/Param/OrderNumber.php index 8bb3f45..8df275f 100644 --- a/src/Param/OrderNumber.php +++ b/src/Param/OrderNumber.php @@ -39,7 +39,7 @@ public function __construct($value) } /** - * @return mixed + * @return int|float|string */ public function getValue() { diff --git a/tests/ResponseProviderTest.php b/tests/ResponseProviderTest.php index 6ea0e96..89f50fe 100644 --- a/tests/ResponseProviderTest.php +++ b/tests/ResponseProviderTest.php @@ -77,7 +77,7 @@ public function testOnError(): void $called = false; $provider->addOnError( - static function (GPWebPayException $exception, ResponseInterface $response) use (&$called) { + static function (GPWebPayException $exception, ResponseInterface $response) use (&$called): void { $called = true; } ); @@ -93,7 +93,7 @@ public function testOnSuccess(): void $called = false; $provider->addOnSuccess( - static function (ResponseInterface $response) use (&$called) { + static function (ResponseInterface $response) use (&$called): void { $called = true; } ); diff --git a/tests/Signer/Key/AbstractKeyTest.php b/tests/Signer/Key/AbstractKeyTest.php index 212d15f..bed373a 100644 --- a/tests/Signer/Key/AbstractKeyTest.php +++ b/tests/Signer/Key/AbstractKeyTest.php @@ -27,11 +27,9 @@ public function testNotExistFileThrowException(): void new class ('misssing_file') extends AbstractKey { - /** - * @return resource|void - */ protected function createKey() { + //@phpstan-ignore-next-line return; } }; diff --git a/tests/Signer/Key/PublicKeyTest.php b/tests/Signer/Key/PublicKeyTest.php index 1f1b873..036e530 100644 --- a/tests/Signer/Key/PublicKeyTest.php +++ b/tests/Signer/Key/PublicKeyTest.php @@ -47,7 +47,7 @@ public function testReadFileThrowException(): void $publicKey = $this->getMockBuilder(PublicKey::class) ->setConstructorArgs([$file]) - ->setMethods(['getContent']) + ->onlyMethods(['getContent']) ->getMock(); $publicKey->expects(self::once())->method('getContent')->willReturn('');