Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Oct 26, 2022
1 parent 7bd3ca1 commit 32d5c2d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 20 deletions.
10 changes: 3 additions & 7 deletions API/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -36,19 +36,15 @@ 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
* @override
* @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']);}
}
5 changes: 2 additions & 3 deletions API/Facade/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();}
}
9 changes: 3 additions & 6 deletions API/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Backend/Enable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
3 changes: 1 addition & 2 deletions Settings/Boleto.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';});}
}
2 changes: 1 addition & 1 deletion Source/Prefill.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 32d5c2d

Please sign in to comment.