Skip to content

Commit 32d5c2d

Browse files
no message
1 parent 7bd3ca1 commit 32d5c2d

File tree

6 files changed

+11
-20
lines changed

6 files changed

+11
-20
lines changed

API/Client.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ protected function _construct() {parent::_construct(); $this->reqJson(); $this->
2222
* @used-by \Df\API\Client::_p()
2323
* @return array(string => string)
2424
*/
25-
protected function headers() {/** @var S $s */$s = dfps($this); return [
25+
protected function headers():array {/** @var S $s */$s = dfps($this); return [
2626
# 2017-07-13 Should be a HTTP Basic access authentication header. Required.
2727
# https://en.wikipedia.org/wiki/Basic_access_authentication
2828
# https://github.com/moip/moip-sdk-php/blob/v1.2.0/src/Auth/BasicAuth.php#L66
@@ -36,19 +36,15 @@ protected function headers() {/** @var S $s */$s = dfps($this); return [
3636
* @override
3737
* @see \Df\API\Client::responseValidatorC()
3838
* @used-by \Df\API\Client::_p()
39-
* @return string
4039
*/
41-
protected function responseValidatorC() {return \Dfe\Moip\API\Validator::class;}
40+
protected function responseValidatorC():string {return \Dfe\Moip\API\Validator::class;}
4241

4342
/**
4443
* 2017-07-13
4544
* @override
4645
* @see \Df\API\Client::urlBase()
4746
* @used-by \Df\API\Client::__construct()
4847
* @used-by \Df\API\Client::url()
49-
* @return string
5048
*/
51-
protected function urlBase() {return dfp_url_api(
52-
$this, 'https://{stage}.moip.com.br/v2', ['sandbox', 'api']
53-
);}
49+
protected function urlBase():string {return dfp_url_api($this, 'https://{stage}.moip.com.br/v2', ['sandbox', 'api']);}
5450
}

API/Facade/Notification.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ function targets() {return array_column($this->all()->a(), 'target');}
5151
* @override
5252
* @see \Df\API\Facade::prefix()
5353
* @used-by \Df\API\Facade::path()
54-
* @return string
5554
*/
56-
protected function prefix() {return 'preferences';}
55+
protected function prefix():string {return 'preferences';}
5756

5857
/**
5958
* 2017-10-19
@@ -66,5 +65,5 @@ protected function prefix() {return 'preferences';}
6665
* @used-by \Df\API\Facade::p()
6766
* @return array(string => mixed)
6867
*/
69-
protected function zfConfig() {return ['timeout' => 15] + parent::zfConfig();}
68+
protected function zfConfig():array {return ['timeout' => 15] + parent::zfConfig();}
7069
}

API/Validator.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ final class Validator extends \Df\API\Response\Validator {
88
* @override
99
* @see \Df\API\Exception::long()
1010
* @used-by \Df\API\Client::_p()
11-
* @return string
1211
*/
13-
function long() {return $this->ERROR() ?: df_json_encode(array_map('df_clean', $this->errors()));}
12+
function long():string {return $this->ERROR() ?: df_json_encode(array_map('df_clean', $this->errors()));}
1413

1514
/**
1615
* 2017-07-13
@@ -20,18 +19,16 @@ function long() {return $this->ERROR() ?: df_json_encode(array_map('df_clean', $
2019
* @override
2120
* @see \Df\API\Exception::short()
2221
* @used-by \Df\API\Client::_p()
23-
* @return string
2422
*/
25-
function short() {return $this->ERROR() ?: dfa_deep($this->errors(), '0/description');}
23+
function short():string {return $this->ERROR() ?: dfa_deep($this->errors(), '0/description');}
2624

2725
/**
2826
* 2017-07-13
2927
* @override
3028
* @see \Df\API\Response\Validator::valid()
3129
* @used-by \Df\API\Client::_p()
32-
* @return bool
3330
*/
34-
function valid() {return !$this->ERROR() && !$this->errors();}
31+
function valid():bool {return !$this->ERROR() && !$this->errors();}
3532

3633
/**
3734
* 2017-07-06

Backend/Enable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Enable extends \Df\Config\Backend\Checkbox {
1212
* @see \Df\Config\Backend::dfSaveAfter()
1313
* @used-by \Df\Config\Backend::save()
1414
*/
15-
final protected function dfSaveAfter() {
15+
final protected function dfSaveAfter():void {
1616
parent::dfSaveAfter();
1717
df_cache_clean();
1818
$m = dfpm($this); /** @var M $m */

Settings/Boleto.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ function waitPeriod() {return WaitPeriodType::calculate($this);}
2626
* @override
2727
* @see \Df\Payment\Settings::prefix()
2828
* @used-by \Df\Config\Settings::v()
29-
* @return string
3029
*/
31-
protected function prefix() {return dfc($this, function() {return parent::prefix() . '/boleto';});}
30+
protected function prefix():string {return dfc($this, function() {return parent::prefix() . '/boleto';});}
3231
}

Source/Prefill.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ final class Prefill extends \Df\Config\Source {
99
* @used-by \Df\Config\Source::toOptionArray()
1010
* @return array(string => string)
1111
*/
12-
protected function map() {return [
12+
protected function map():array {return [
1313
0 => 'No'
1414
,'376449047333005' => 'American Express'
1515
,'36490102462661' => 'Diners Club International'

0 commit comments

Comments
 (0)