Skip to content

Commit 4522420

Browse files
committed
TASK: Small refactoring $this is accessible in the callback function
1 parent 6f3572e commit 4522420

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Indexer

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Indexer/NodeIndexer.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,9 @@ public function indexNode(NodeInterface $node, $targetWorkspaceName = null)
195195
return;
196196
}
197197

198-
$logger = $this->logger;
199198
$fulltextIndexOfNode = array();
200-
$nodePropertiesToBeStoredInIndex = $this->extractPropertiesAndFulltext($node, $fulltextIndexOfNode, function ($propertyName) use ($logger, $contextPathHash) {
201-
$logger->log(sprintf('NodeIndexer (%s) - Property "%s" not indexed because no configuration found.', $contextPathHash, $propertyName), LOG_DEBUG, null, 'ElasticSearch (CR)');
199+
$nodePropertiesToBeStoredInIndex = $this->extractPropertiesAndFulltext($node, $fulltextIndexOfNode, function ($propertyName) use ($contextPathHash) {
200+
$this->logger->log(sprintf('NodeIndexer (%s) - Property "%s" not indexed because no configuration found.', $contextPathHash, $propertyName), LOG_DEBUG, null, 'ElasticSearch (CR)');
202201
});
203202

204203
$document = new ElasticSearchDocument($mappingType,
@@ -240,6 +239,8 @@ public function indexNode(NodeInterface $node, $targetWorkspaceName = null)
240239
$indexer($node, $targetWorkspaceName);
241240
}
242241
}
242+
}
243+
243244
/**
244245
* @param NodeInterface $node
245246
* @param ElasticSearchDocument $document

0 commit comments

Comments
 (0)