From 32d5c2d22b4f8dad5599956d7a1e7a1e8e456184 Mon Sep 17 00:00:00 2001 From: Dmitry Fedyuk Date: Wed, 26 Oct 2022 15:46:59 +0300 Subject: [PATCH] no message --- API/Client.php | 10 +++------- API/Facade/Notification.php | 5 ++--- API/Validator.php | 9 +++------ Backend/Enable.php | 2 +- Settings/Boleto.php | 3 +-- Source/Prefill.php | 2 +- 6 files changed, 11 insertions(+), 20 deletions(-) diff --git a/API/Client.php b/API/Client.php index e4df699..cca3ae4 100644 --- a/API/Client.php +++ b/API/Client.php @@ -22,7 +22,7 @@ protected function _construct() {parent::_construct(); $this->reqJson(); $this-> * @used-by \Df\API\Client::_p() * @return array(string => string) */ - protected function headers() {/** @var S $s */$s = dfps($this); return [ + protected function headers():array {/** @var S $s */$s = dfps($this); return [ # 2017-07-13 Should be a HTTP Basic access authentication header. Required. # https://en.wikipedia.org/wiki/Basic_access_authentication # https://github.com/moip/moip-sdk-php/blob/v1.2.0/src/Auth/BasicAuth.php#L66 @@ -36,9 +36,8 @@ protected function headers() {/** @var S $s */$s = dfps($this); return [ * @override * @see \Df\API\Client::responseValidatorC() * @used-by \Df\API\Client::_p() - * @return string */ - protected function responseValidatorC() {return \Dfe\Moip\API\Validator::class;} + protected function responseValidatorC():string {return \Dfe\Moip\API\Validator::class;} /** * 2017-07-13 @@ -46,9 +45,6 @@ protected function responseValidatorC() {return \Dfe\Moip\API\Validator::class;} * @see \Df\API\Client::urlBase() * @used-by \Df\API\Client::__construct() * @used-by \Df\API\Client::url() - * @return string */ - protected function urlBase() {return dfp_url_api( - $this, 'https://{stage}.moip.com.br/v2', ['sandbox', 'api'] - );} + protected function urlBase():string {return dfp_url_api($this, 'https://{stage}.moip.com.br/v2', ['sandbox', 'api']);} } \ No newline at end of file diff --git a/API/Facade/Notification.php b/API/Facade/Notification.php index 8ef6398..074c94e 100644 --- a/API/Facade/Notification.php +++ b/API/Facade/Notification.php @@ -51,9 +51,8 @@ function targets() {return array_column($this->all()->a(), 'target');} * @override * @see \Df\API\Facade::prefix() * @used-by \Df\API\Facade::path() - * @return string */ - protected function prefix() {return 'preferences';} + protected function prefix():string {return 'preferences';} /** * 2017-10-19 @@ -66,5 +65,5 @@ protected function prefix() {return 'preferences';} * @used-by \Df\API\Facade::p() * @return array(string => mixed) */ - protected function zfConfig() {return ['timeout' => 15] + parent::zfConfig();} + protected function zfConfig():array {return ['timeout' => 15] + parent::zfConfig();} } \ No newline at end of file diff --git a/API/Validator.php b/API/Validator.php index 9f87264..614fc48 100644 --- a/API/Validator.php +++ b/API/Validator.php @@ -8,9 +8,8 @@ final class Validator extends \Df\API\Response\Validator { * @override * @see \Df\API\Exception::long() * @used-by \Df\API\Client::_p() - * @return string */ - function long() {return $this->ERROR() ?: df_json_encode(array_map('df_clean', $this->errors()));} + function long():string {return $this->ERROR() ?: df_json_encode(array_map('df_clean', $this->errors()));} /** * 2017-07-13 @@ -20,18 +19,16 @@ function long() {return $this->ERROR() ?: df_json_encode(array_map('df_clean', $ * @override * @see \Df\API\Exception::short() * @used-by \Df\API\Client::_p() - * @return string */ - function short() {return $this->ERROR() ?: dfa_deep($this->errors(), '0/description');} + function short():string {return $this->ERROR() ?: dfa_deep($this->errors(), '0/description');} /** * 2017-07-13 * @override * @see \Df\API\Response\Validator::valid() * @used-by \Df\API\Client::_p() - * @return bool */ - function valid() {return !$this->ERROR() && !$this->errors();} + function valid():bool {return !$this->ERROR() && !$this->errors();} /** * 2017-07-06 diff --git a/Backend/Enable.php b/Backend/Enable.php index d895795..d612183 100644 --- a/Backend/Enable.php +++ b/Backend/Enable.php @@ -12,7 +12,7 @@ class Enable extends \Df\Config\Backend\Checkbox { * @see \Df\Config\Backend::dfSaveAfter() * @used-by \Df\Config\Backend::save() */ - final protected function dfSaveAfter() { + final protected function dfSaveAfter():void { parent::dfSaveAfter(); df_cache_clean(); $m = dfpm($this); /** @var M $m */ diff --git a/Settings/Boleto.php b/Settings/Boleto.php index 477e9c8..4048a5a 100644 --- a/Settings/Boleto.php +++ b/Settings/Boleto.php @@ -26,7 +26,6 @@ function waitPeriod() {return WaitPeriodType::calculate($this);} * @override * @see \Df\Payment\Settings::prefix() * @used-by \Df\Config\Settings::v() - * @return string */ - protected function prefix() {return dfc($this, function() {return parent::prefix() . '/boleto';});} + protected function prefix():string {return dfc($this, function() {return parent::prefix() . '/boleto';});} } \ No newline at end of file diff --git a/Source/Prefill.php b/Source/Prefill.php index b5cb3ee..ac56a9a 100644 --- a/Source/Prefill.php +++ b/Source/Prefill.php @@ -9,7 +9,7 @@ final class Prefill extends \Df\Config\Source { * @used-by \Df\Config\Source::toOptionArray() * @return array(string => string) */ - protected function map() {return [ + protected function map():array {return [ 0 => 'No' ,'376449047333005' => 'American Express' ,'36490102462661' => 'Diners Club International'