From a8e5b813f6587a4eacea746fd66332aac7ae00a1 Mon Sep 17 00:00:00 2001 From: "Abdulmhsen B. A. A" Date: Sun, 22 May 2022 18:54:29 +0300 Subject: [PATCH] renamed method parameter to better reflect the actual changes. --- src/Libs/Entity/StateEntity.php | 4 ++-- src/Libs/Entity/StateInterface.php | 4 ++-- src/Libs/Initializer.php | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Libs/Entity/StateEntity.php b/src/Libs/Entity/StateEntity.php index 5838798a..52c1afdf 100644 --- a/src/Libs/Entity/StateEntity.php +++ b/src/Libs/Entity/StateEntity.php @@ -218,9 +218,9 @@ final class StateEntity implements iFace return $rPointers; } - public function apply(iFace $entity, bool $guidOnly = false): self + public function apply(iFace $entity, bool $metadataOnly = false): self { - if (true === $guidOnly) { + if (true === $metadataOnly) { foreach (iFace::ENTITY_FORCE_UPDATE_FIELDS as $key) { if (true === $this->isEqualValue($key, $entity)) { continue; diff --git a/src/Libs/Entity/StateInterface.php b/src/Libs/Entity/StateInterface.php index cda22e00..fd9690be 100644 --- a/src/Libs/Entity/StateInterface.php +++ b/src/Libs/Entity/StateInterface.php @@ -199,11 +199,11 @@ interface StateInterface * Apply changes to entity. * * @param StateInterface $entity - * @param bool $guidOnly + * @param bool $metadataOnly * * @return StateInterface */ - public function apply(StateInterface $entity, bool $guidOnly = false): StateInterface; + public function apply(StateInterface $entity, bool $metadataOnly = false): StateInterface; /** * Update Original data. diff --git a/src/Libs/Initializer.php b/src/Libs/Initializer.php index 59201f6d..eab1819f 100644 --- a/src/Libs/Initializer.php +++ b/src/Libs/Initializer.php @@ -318,7 +318,7 @@ final class Initializer if (true === $entity->isTainted()) { $cloned = clone $backend; - if ($cloned->apply($entity, guidOnly: true)->isChanged()) { + if ($cloned->apply($entity, metadataOnly: true)->isChanged()) { $backend = $storage->update($backend->apply($entity)); return jsonResponse( status: 200, @@ -334,7 +334,7 @@ final class Initializer } if ($backend->updated >= $entity->updated) { - if ($backend->apply($entity, guidOnly: true)->isChanged()) { + if ($backend->apply($entity, metadataOnly: true)->isChanged()) { $backend = $storage->update($backend->apply($entity)); return jsonResponse( status: 200, @@ -356,7 +356,7 @@ final class Initializer $cloned = clone $backend; - if ($backend->apply($entity, guidOnly: true)->isChanged()) { + if ($backend->apply($entity, metadataOnly: true)->isChanged()) { $backend = $storage->update($backend->apply($entity)); $message = 'Updated %s metadata.';