Skip to content

Commit fe4e3aa

Browse files
Fixed PHP 8.2 deprecations [continuation] (#2514)
* Fixed PHP 8.2 deprecations * Fix (unrelated) code style --------- Co-authored-by: Damien McKenna <[email protected]>
1 parent 79e40cb commit fe4e3aa

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

src/Config/DefaultsConfig.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class DefaultsConfig extends TerminusConfig
1515
*/
1616
protected $source_name = 'Default';
1717

18+
protected $defaults = [];
19+
1820
/**
1921
* DefaultsConfig constructor.
2022
*/

src/Config/DotEnvConfig.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class DotEnvConfig extends TerminusConfig
1313
*/
1414
protected $file;
1515

16+
protected $defaults = [];
17+
1618
/**
1719
* DotEnvConfig constructor.
1820
*/

src/Config/EnvConfig.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class EnvConfig extends TerminusConfig
1010
{
1111
protected $source_name = 'Environment Variable';
1212

13+
protected $defaults = [];
14+
1315
/**
1416
* EnvConfig constructor.
1517
*/

src/Config/YamlConfig.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
*/
1111
class YamlConfig extends TerminusConfig
1212
{
13+
protected $defaults = [];
14+
1315
/**
1416
* YamlConfig constructor.
1517
* @param string $yml_path The path to the yaml file.

src/Request/Request.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ class Request implements
7070

7171
private static $TRACE_ID = null;
7272

73-
/**
74-
* Generate UUID for use as distributed tracing ID and assign to static class variable
75-
*/
73+
/**
74+
* Generate UUID for use as distributed tracing ID and assign to static class variable
75+
*/
7676
public static function generateTraceId()
7777
{
7878
self::$TRACE_ID = vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex(random_bytes(16)), 4));
@@ -193,7 +193,7 @@ private function createRetryDecider(): callable
193193
$maxRetries,
194194
$logWarning
195195
) {
196-
$logWarningOnRetry = fn(string $reason) => 0 === $retry
196+
$logWarningOnRetry = fn (string $reason) => 0 === $retry
197197
? $logWarning(
198198
sprintf(
199199
'HTTP request %s %s has failed: %s',

0 commit comments

Comments
 (0)