Skip to content

Commit

Permalink
IBX-5827: Replaced deprecated string interpolation (PHP 8.2+)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nattfarinn committed Oct 3, 2023
1 parent c225702 commit b65e02d
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ public function assertUserWithNameExistsWithFields($username, TableNode $table)
*/
private function findNonExistingUserEmail($username = 'User')
{
$email = "${username}@ez.no";
$email = "{$username}@ez.no";
if ($this->checkUserExistenceByEmail($email)) {
return $email;
}
Expand Down
2 changes: 1 addition & 1 deletion eZ/Publish/API/Repository/Tests/BaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ protected function getSetupFactory(): SetupFactory
if (null === $this->setupFactory) {
if (false === ($setupClass = getenv('setupFactory'))) {
$setupClass = LegacySetupFactory::class;
putenv("setupFactory=${setupClass}");
putenv("setupFactory={$setupClass}");
}

if (false === getenv('fixtureDir')) {
Expand Down
2 changes: 1 addition & 1 deletion eZ/Publish/API/Repository/Tests/ContentTypeServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ public function testCreateContentTypeStructValues(array $data)
$this->assertEquals(
$typeCreate->$propertyName,
$contentType->$propertyName,
"Did not assert that property '${propertyName}' is equal on struct and resulting value object"
"Did not assert that property '{$propertyName}' is equal on struct and resulting value object"
);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion eZ/Publish/Core/FieldType/GatewayBasedStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected function getGateway(array $context)
);

if (!isset($this->gateways[$context['identifier']])) {
throw new \OutOfBoundsException("No gateway for ${context['identifier']} available.");
throw new \OutOfBoundsException("No gateway for {$context['identifier']} available.");
}

$gateway = $this->gateways[$context['identifier']];
Expand Down
4 changes: 2 additions & 2 deletions eZ/Publish/Core/Persistence/Cache/AbstractHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ public function __construct(
/**
* Helper for getting multiple cache items in one call and do the id extraction for you.
*
* Cache items must be stored with a key in the following format "${keyPrefix}${id}", like "ez-content-info-${id}",
* Cache items must be stored with a key in the following format "{$keyPrefix}{$id}", like "ez-content-info-{$id}",
* in order for this method to be able to prefix key on id's and also extract key prefix afterwards.
*
* It also optionally supports a key suffixs, for use on a variable argument that affects all lookups,
* like translations, i.e. "ez-content-${id}-${translationKey}" where $keySuffixes = [$id => "-${translationKey}"].
* like translations, i.e. "ez-content-{$id}-{$translationKey}" where $keySuffixes = [$id => "-{$translationKey}"].
*
* @param array $ids
* @param string $keyPrefix E.g "ez-content-"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ final protected function getListCacheValue(
* Load items from in-memory cache, symfony cache pool or backend in that order.
* If not cached the returned objects will be placed in cache.
*
* Cache items must be stored with a key in the following format "${keyPrefix}${id}", like "ez-content-info-${id}",
* Cache items must be stored with a key in the following format "{$keyPrefix}{$id}", like "ez-content-info-{$id}",
* in order for this method to be able to prefix key on id's and also extract key prefix afterwards.
*
* @param array $ids
Expand Down
4 changes: 2 additions & 2 deletions eZ/Publish/Core/Persistence/Cache/ContentHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function copy($contentId, $versionNo = null, $newOwnerId = null)
*/
public function load($contentId, $versionNo = null, array $translations = null)
{
$keySuffix = $versionNo ? "-${versionNo}-" : '-';
$keySuffix = $versionNo ? "-{$versionNo}-" : '-';
$keySuffix .= empty($translations) ? self::ALL_TRANSLATIONS_KEY : implode('|', $translations);

return $this->getCacheValue(
Expand Down Expand Up @@ -235,7 +235,7 @@ function () use ($remoteId) {
*/
public function loadVersionInfo($contentId, $versionNo = null)
{
$keySuffix = $versionNo ? "-${versionNo}" : '';
$keySuffix = $versionNo ? "-{$versionNo}" : '';
$cacheItem = $this->cache->getItem(
$this->cacheIdentifierGenerator->generateKey(
self::CONTENT_VERSION_INFO_IDENTIFIER,
Expand Down

0 comments on commit b65e02d

Please sign in to comment.