Skip to content

Commit

Permalink
Fixed PHP 8.2 deprecations [continuation] (#2514)
Browse files Browse the repository at this point in the history
* Fixed PHP 8.2 deprecations

* Fix (unrelated) code style

---------

Co-authored-by: Damien McKenna <[email protected]>
  • Loading branch information
greg-1-anderson and damienmckenna authored Nov 13, 2023
1 parent 79e40cb commit fe4e3aa
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/Config/DefaultsConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class DefaultsConfig extends TerminusConfig
*/
protected $source_name = 'Default';

protected $defaults = [];

/**
* DefaultsConfig constructor.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/Config/DotEnvConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class DotEnvConfig extends TerminusConfig
*/
protected $file;

protected $defaults = [];

/**
* DotEnvConfig constructor.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/Config/EnvConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class EnvConfig extends TerminusConfig
{
protected $source_name = 'Environment Variable';

protected $defaults = [];

/**
* EnvConfig constructor.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/Config/YamlConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
*/
class YamlConfig extends TerminusConfig
{
protected $defaults = [];

/**
* YamlConfig constructor.
* @param string $yml_path The path to the yaml file.
Expand Down
8 changes: 4 additions & 4 deletions src/Request/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ class Request implements

private static $TRACE_ID = null;

/**
* Generate UUID for use as distributed tracing ID and assign to static class variable
*/
/**
* Generate UUID for use as distributed tracing ID and assign to static class variable
*/
public static function generateTraceId()
{
self::$TRACE_ID = vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex(random_bytes(16)), 4));
Expand Down Expand Up @@ -193,7 +193,7 @@ private function createRetryDecider(): callable
$maxRetries,
$logWarning
) {
$logWarningOnRetry = fn(string $reason) => 0 === $retry
$logWarningOnRetry = fn (string $reason) => 0 === $retry
? $logWarning(
sprintf(
'HTTP request %s %s has failed: %s',
Expand Down

0 comments on commit fe4e3aa

Please sign in to comment.