Skip to content

Commit a1b77af

Browse files
authored
Merge pull request #241 from kdambekalns/code-cleanup
TASK: Some (automated) code cleanup
2 parents c71859e + b1f8691 commit a1b77af

16 files changed

Lines changed: 16 additions & 16 deletions

Classes/Driver/Version1/DocumentDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\DocumentDriverInterface;
1616
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Mapping\NodeTypeMappingBuilder;
1717
use Flowpack\ElasticSearch\Domain\Model\Index;
18-
use Neos\Flow\Annotations as Flow;
1918
use Neos\ContentRepository\Domain\Model\NodeInterface;
2019
use Neos\ContentRepository\Domain\Model\NodeType;
20+
use Neos\Flow\Annotations as Flow;
2121

2222
/**
2323
* Document driver for Elasticsearch version 1.x

Classes/Driver/Version1/IndexDriver.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public function indexesByAlias($alias)
5757

5858
// return empty array if content from response cannot be read as an array
5959
$treatedContent = $response->getTreatedContent();
60+
6061
return is_array($treatedContent) ? array_keys($treatedContent) : [];
6162
}
6263
}

Classes/Driver/Version1/IndexerDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\IndexerDriverInterface;
1616
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Mapping\NodeTypeMappingBuilder;
1717
use Flowpack\ElasticSearch\Domain\Model\Document as ElasticSearchDocument;
18-
use Neos\Flow\Annotations as Flow;
1918
use Neos\ContentRepository\Domain\Model\NodeInterface;
19+
use Neos\Flow\Annotations as Flow;
2020

2121
/**
2222
* Indexer driver for Elasticsearch version 1.x

Classes/Driver/Version2/DocumentDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version1;
1515
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Mapping\NodeTypeMappingBuilder;
1616
use Flowpack\ElasticSearch\Domain\Model\Index;
17-
use Neos\Flow\Annotations as Flow;
1817
use Neos\ContentRepository\Domain\Model\NodeType;
18+
use Neos\Flow\Annotations as Flow;
1919

2020
/**
2121
* Document driver for Elasticsearch version 2.x

Classes/Driver/Version2/IndexerDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version1;
1515
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Mapping\NodeTypeMappingBuilder;
1616
use Flowpack\ElasticSearch\Domain\Model\Document as ElasticSearchDocument;
17-
use Neos\Flow\Annotations as Flow;
1817
use Neos\ContentRepository\Domain\Model\NodeInterface;
18+
use Neos\Flow\Annotations as Flow;
1919

2020
/**
2121
* Indexer driver for Elasticsearch version 2.x

Classes/Eel/ElasticSearchQueryBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Exception;
1717
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Exception\QueryBuildingException;
1818
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\LoggerInterface;
19+
use Neos\ContentRepository\Domain\Model\NodeInterface;
20+
use Neos\ContentRepository\Search\Search\QueryBuilderInterface;
1921
use Neos\Eel\ProtectedContextAwareInterface;
2022
use Neos\Flow\Annotations as Flow;
2123
use Neos\Flow\ObjectManagement\ObjectManagerInterface;
22-
use Neos\ContentRepository\Domain\Model\NodeInterface;
23-
use Neos\ContentRepository\Search\Search\QueryBuilderInterface;
2424

2525
/**
2626
* Query Builder for ElasticSearch Queries

Classes/Eel/ElasticSearchQueryResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
* source code.
1212
*/
1313

14+
use Neos\ContentRepository\Domain\Model\NodeInterface;
1415
use Neos\Eel\ProtectedContextAwareInterface;
1516
use Neos\Flow\Persistence\QueryResultInterface;
16-
use Neos\ContentRepository\Domain\Model\NodeInterface;
1717

1818
class ElasticSearchQueryResult implements QueryResultInterface, ProtectedContextAwareInterface
1919
{

Classes/Eel/SearchResultHelper.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
*/
1313

1414
use Neos\Eel\ProtectedContextAwareInterface;
15-
use Neos\Flow\Annotations as Flow;
1615

1716
/**
1817
* Eel Helper to process the ElasticSearch Query Result

Classes/ElasticSearchClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Service\IndexNameStrategyInterface;
1515
use Neos\Flow\Annotations as Flow;
16-
use Neos\Flow\Configuration\ConfigurationManager;
1716

1817
/**
1918
* The elasticsearch client to be used by the content repository adapter. Singleton, can be injected.
@@ -44,6 +43,7 @@ public function getIndexName()
4443
if ($name === '') {
4544
throw new Exception('Index name can not be null');
4645
}
46+
4747
return $name;
4848
}
4949

Classes/Indexer/Error/BulkIndexingError.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ public function message()
8787
return $this->message;
8888
}
8989

90-
9190
/**
9291
* @return string
9392
*/
9493
protected function renderErrors()
9594
{
9695
$bulkRequest = json_encode($this->currentBulkRequest, JSON_PRETTY_PRINT);
9796
$errors = json_encode($this->errors, JSON_PRETTY_PRINT);
97+
9898
return sprintf("Payload:\n========\n\n%s\n\nErrors:\n=======\n\n%s\n\n", $bulkRequest, $errors);
9999
}
100100
}

0 commit comments

Comments
 (0)