Skip to content

Commit 241f977

Browse files
kdambekalnsStyleCIBot
authored andcommitted
Applied fixes from StyleCI
1 parent 26e2dcc commit 241f977

5 files changed

Lines changed: 5 additions & 8 deletions

File tree

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Eel/ElasticSearchQueryResult.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,4 +255,3 @@ public function allowsCallOfMethod($methodName)
255255
return true;
256256
}
257257
}
258-

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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
/**

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/ViewHelpers/GetHitArrayForNodeViewHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class GetHitArrayForNodeViewHelper extends AbstractViewHelper
4545
* @param array|string $path
4646
* @return array
4747
*/
48-
public function render(ElasticSearchQueryResult $queryResultObject, NodeInterface $node, $path = NULL)
48+
public function render(ElasticSearchQueryResult $queryResultObject, NodeInterface $node, $path = null)
4949
{
5050
$hitArray = $queryResultObject->searchHitForNode($node);
5151

Tests/Unit/Eel/ElasticSearchQueryBuilderResultTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ public function ifNoAggregationsAreSetInTheQueyBuilderResultAnEmptyArrayWillBeRe
4242
$this->assertTrue(is_array($actual));
4343
$this->assertEmpty($actual);
4444
}
45-
}
45+
}

Tests/Unit/ViewHelpers/GetHitArrayForNodeViewHelperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,4 @@ public function aSingleValueWillBeReturnedForADottedPath()
104104
$fullResult = $this->viewHelper->render($this->mockQueryResult, $this->mockNode, 'sort');
105105
$this->assertEquals($hitArray['sort'], $fullResult, 'Full array will be returned if there are multiple values');
106106
}
107-
}
107+
}

0 commit comments

Comments
 (0)