@@ -137,7 +137,6 @@ public function getIndex()
137137 public function indexNode (NodeInterface $ node , $ targetWorkspaceName = null )
138138 {
139139 $ indexer = function (NodeInterface $ node , $ targetWorkspaceName = null ) {
140-
141140 $ contextPath = $ node ->getContextPath ();
142141
143142 if ($ this ->settings ['indexAllWorkspaces ' ] === false ) {
@@ -164,7 +163,7 @@ public function indexNode(NodeInterface $node, $targetWorkspaceName = null)
164163 $ mappingType = $ this ->getIndex ()->findType (NodeTypeMappingBuilder::convertNodeTypeNameToMappingName ($ nodeType ));
165164
166165 // Remove document with the same contextPathHash but different NodeType, required after NodeType change
167- $ this ->logger ->log (sprintf ('NodeIndexer: Removing node %s from index (if node type changed from %s). ID: %s ' , $ contextPath , $ node ->getNodeType ()->getName (), $ contextPathHash ), LOG_DEBUG , NULL , 'ElasticSearch (CR) ' );
166+ $ this ->logger ->log (sprintf ('NodeIndexer: Removing node %s from index (if node type changed from %s). ID: %s ' , $ contextPath , $ node ->getNodeType ()->getName (), $ contextPathHash ), LOG_DEBUG , null , 'ElasticSearch (CR) ' );
168167 $ this ->getIndex ()->request ('DELETE ' , '/_query ' , array (), json_encode ([
169168 'query ' => [
170169 'bool ' => [
@@ -273,11 +272,10 @@ public function indexNode(NodeInterface $node, $targetWorkspaceName = null)
273272 } else {
274273 $ context = $ this ->contextFactory ->create (array ('workspaceName ' => $ workspaceName ));
275274 $ node = $ context ->getNodeByIdentifier ($ nodeIdentifier );
276- if ($ node !== NULL ) {
275+ if ($ node !== null ) {
277276 $ indexer ($ node , $ targetWorkspaceName );
278277 }
279278 }
280-
281279 }
282280
283281 /**
0 commit comments