diff --git a/demo.php b/demo.php index f2d865e..aa0c328 100644 --- a/demo.php +++ b/demo.php @@ -70,7 +70,7 @@ public function __construct() 'demo.log' ]); - echo "Logging to ${logFile}\n"; + echo "Logging to {$logFile}\n"; LoggerFactory::setup((new MonologLoggerFactory()) ->setDefaultHandlers([ diff --git a/src/Rox/Core/CustomProperties/DeviceProperty.php b/src/Rox/Core/CustomProperties/DeviceProperty.php index 69f7054..2aaf77e 100644 --- a/src/Rox/Core/CustomProperties/DeviceProperty.php +++ b/src/Rox/Core/CustomProperties/DeviceProperty.php @@ -7,6 +7,6 @@ class DeviceProperty extends CustomProperty public function getName() { $name = parent::getName(); - return "rox.${name}"; + return "rox.{$name}"; } } diff --git a/src/Rox/Core/Entities/RoxStringBase.php b/src/Rox/Core/Entities/RoxStringBase.php index ce71a58..4e7338f 100644 --- a/src/Rox/Core/Entities/RoxStringBase.php +++ b/src/Rox/Core/Entities/RoxStringBase.php @@ -90,7 +90,7 @@ protected function checkValueType($value) { $converter = $this->getConverter(); if (!$converter->isValid($value)) { - throw new InvalidArgumentException("Invalid value type: ${value}"); + throw new InvalidArgumentException("Invalid value type: {$value}"); } return $converter->convertToString($value); } @@ -107,7 +107,7 @@ protected function checkVariationsType(array $variations) return !$converter->isValid($value); })) { $invalidValue = array_shift($invalidVariations); - throw new InvalidArgumentException("Invalid variation type: ${invalidValue}"); + throw new InvalidArgumentException("Invalid variation type: {$invalidValue}"); } return array_map(function ($v) use ($converter) { return $converter->convertToString($v); diff --git a/src/Rox/Core/Network/GuzzleHttpClient.php b/src/Rox/Core/Network/GuzzleHttpClient.php index dd4e732..c511149 100644 --- a/src/Rox/Core/Network/GuzzleHttpClient.php +++ b/src/Rox/Core/Network/GuzzleHttpClient.php @@ -128,7 +128,7 @@ function postJson($uri, array $data) RequestOptions::TIMEOUT => $this->_timeout, ])); } catch (GuzzleException $e) { - $this->_log->error("Failed to send data to ${uri}: {$e->getMessage()}", [ + $this->_log->error("Failed to send data to {$uri}: {$e->getMessage()}", [ 'exception' => $e ]); return new HttpErrorResponse($e->getCode(), $e->getMessage()); @@ -142,7 +142,7 @@ function postJson($uri, array $data) */ private function _handleError($uri, GuzzleException $e) { - $this->_log->error("Failed to send data to ${uri}: {$e->getMessage()}", [ + $this->_log->error("Failed to send data to {$uri}: {$e->getMessage()}", [ 'exception' => $e ]); return new HttpErrorResponse($e->getCode(), $e->getMessage()); diff --git a/src/Rox/Core/Register/Registerer.php b/src/Rox/Core/Register/Registerer.php index f3f1ee1..fa5aefd 100644 --- a/src/Rox/Core/Register/Registerer.php +++ b/src/Rox/Core/Register/Registerer.php @@ -65,17 +65,17 @@ public function registerInstance($container, $ns) } } catch (ReflectionException $e) { $type = get_class($container); - $this->_log->error("Failed to obtain properties of class ${type}", [ + $this->_log->error("Failed to obtain properties of class {$type}", [ 'exception' => $e ]); throw new RuntimeException( - "Failed to obtain properties of class ${type}. See inner exception for details.", 0, $e); + "Failed to obtain properties of class {$type}. See inner exception for details.", 0, $e); } foreach ($properties as $name => $value) { if ($value instanceof RoxStringBase) { if ($ns) { - $name = "${ns}.${name}"; + $name = "{$ns}.{$name}"; } $this->_flagRepository->addFlag($value, $name); } diff --git a/src/Rox/Core/Roxx/ExperimentsExtensions.php b/src/Rox/Core/Roxx/ExperimentsExtensions.php index be95241..e2e026a 100644 --- a/src/Rox/Core/Roxx/ExperimentsExtensions.php +++ b/src/Rox/Core/Roxx/ExperimentsExtensions.php @@ -54,7 +54,7 @@ public function extend() $this->_parser->addOperator("mergeSeed", function (ParserInterface $parser, StackInterface $stack, ContextInterface $context) { $seed1 = (string)$stack->pop(); $seed2 = (string)$stack->pop(); - $stack->push("${seed1}.${seed2}"); + $stack->push("{$seed1}.{$seed2}"); }); $this->_parser->addOperator("isInPercentage", function (ParserInterface $parser, StackInterface $stack, ContextInterface $context) { diff --git a/src/Rox/Core/Roxx/Parser.php b/src/Rox/Core/Roxx/Parser.php index d95248e..8667038 100644 --- a/src/Rox/Core/Roxx/Parser.php +++ b/src/Rox/Core/Roxx/Parser.php @@ -285,7 +285,7 @@ public function evaluateExpression($expression, $context = null, $evaluationCont } catch (Exception $exception) { - $this->_log->warning("Roxx Exception: Failed evaluate expression ${expression}", [ + $this->_log->warning("Roxx Exception: Failed evaluate expression {$expression}", [ 'exception' => $exception ]); } diff --git a/src/Rox/Core/Roxx/RegularExpressionExtensions.php b/src/Rox/Core/Roxx/RegularExpressionExtensions.php index 92b9927..32ee9f0 100644 --- a/src/Rox/Core/Roxx/RegularExpressionExtensions.php +++ b/src/Rox/Core/Roxx/RegularExpressionExtensions.php @@ -58,11 +58,11 @@ function (ParserInterface $parser, StackInterface $stack, ContextInterface $cont } if ($flag == 'n') { - $this->_log->warning("Regexp flag ${flag} is not supported."); + $this->_log->warning("Regexp flag {$flag} is not supported."); } } - $stack->push(preg_match("/${pattern}/${filteredFlags}", $str) === 1); + $stack->push(preg_match("/{$pattern}/{$filteredFlags}", $str) === 1); }); } } diff --git a/src/Rox/Core/XPack/Analytics/AnalyticsClient.php b/src/Rox/Core/XPack/Analytics/AnalyticsClient.php index 8839449..6382be9 100644 --- a/src/Rox/Core/XPack/Analytics/AnalyticsClient.php +++ b/src/Rox/Core/XPack/Analytics/AnalyticsClient.php @@ -117,7 +117,7 @@ private function _flushBatch(array $messages) if (200 == $statusCode) { return true; } - $this->_log->error("Failed to post data to ${url}: HTTP response code ${statusCode} ({$response->getContent()->readAsString()})"); + $this->_log->error("Failed to post data to {$url}: HTTP response code {$statusCode} ({$response->getContent()->readAsString()})"); return false; } diff --git a/src/Rox/Core/XPack/Security/XSignatureVerifier.php b/src/Rox/Core/XPack/Security/XSignatureVerifier.php index 8132255..c1ddf05 100644 --- a/src/Rox/Core/XPack/Security/XSignatureVerifier.php +++ b/src/Rox/Core/XPack/Security/XSignatureVerifier.php @@ -17,7 +17,7 @@ function verify($data, $signatureBase64) return true; } $cert = chunk_split(self::ROXCertificateBase64); - $publicKey = openssl_pkey_get_public("-----BEGIN CERTIFICATE-----\n${cert}-----END CERTIFICATE-----"); + $publicKey = openssl_pkey_get_public("-----BEGIN CERTIFICATE-----\n{$cert}-----END CERTIFICATE-----"); $signature = base64_decode($signatureBase64); return openssl_verify($data, $signature, $publicKey, OPENSSL_ALGO_SHA256) === 1; }