Skip to content

Commit d11662c

Browse files
committed
TASK: Clean up (mostly) use statements
1 parent efed6e2 commit d11662c

15 files changed

Lines changed: 13 additions & 23 deletions

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Driver/AbstractDriver.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\ElasticSearchClient;
1515
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\LoggerInterface;
1616
use TYPO3\Flow\Annotations as Flow;
17-
use TYPO3\TYPO3CR\Domain\Model\NodeInterface;
1817

1918
/**
2019
* Abstract Elasticsearch driver

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Driver/AbstractIndexerDriver.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
* source code.
1212
*/
1313

14-
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\ElasticSearchClient;
15-
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\LoggerInterface;
16-
use TYPO3\Flow\Annotations as Flow;
1714
use TYPO3\TYPO3CR\Domain\Model\NodeInterface;
1815

1916
/**

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Driver/Version1/IndexerDriver.php

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

14-
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\AbstractDriver;
1514
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\AbstractIndexerDriver;
1615
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\DriverInterface;
1716
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\IndexerDriverInterface;
@@ -98,6 +97,7 @@ public function fulltext(NodeInterface $node, array $fulltextIndexOfNode, $targe
9897
if ($closestFulltextNode->isRemoved()) {
9998
// fulltext root is removed, abort silently...
10099
$this->logger->log(sprintf('NodeIndexer (%s): Fulltext root found for %s (%s) not updated, it is removed', $closestFulltextNodeDocumentIdentifier, $node->getPath(), $node->getIdentifier()), LOG_DEBUG, null, 'ElasticSearch (CR)');
100+
101101
return null;
102102
}
103103

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Driver/Version2/DocumentDriver.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Mapping\NodeTypeMappingBuilder;
1616
use Flowpack\ElasticSearch\Domain\Model\Index;
1717
use TYPO3\Flow\Annotations as Flow;
18-
use TYPO3\TYPO3CR\Domain\Model\NodeInterface;
1918
use TYPO3\TYPO3CR\Domain\Model\NodeType;
2019

2120
/**

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Driver/Version2/IndexerDriver.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ public function fulltext(NodeInterface $node, array $fulltextIndexOfNode, $targe
9999
if ($closestFulltextNode->isRemoved()) {
100100
// fulltext root is removed, abort silently...
101101
$this->logger->log(sprintf('NodeIndexer (%s): Fulltext root found for %s (%s) not updated, it is removed', $closestFulltextNodeDocumentIdentifier, $node->getPath(), $node->getIdentifier()), LOG_DEBUG, null, 'ElasticSearch (CR)');
102+
102103
return null;
103104
}
104105

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ class ElasticSearchQueryBuilder implements QueryBuilderInterface, ProtectedConte
8484

8585
/**
8686
* The ElasticSearch request, as it is being built up.
87+
*
8788
* @var QueryInterface
8889
* @Flow\Inject
8990
*/
@@ -172,7 +173,6 @@ public function sort($configuration)
172173
*
173174
* This algorithm can be re-checked when https://github.com/elasticsearch/elasticsearch/issues/3300 is merged.
174175
*
175-
*
176176
* @param integer $limit
177177
* @return ElasticSearchQueryBuilder
178178
* @api
@@ -201,7 +201,6 @@ public function limit($limit)
201201
/**
202202
* output records starting at $from
203203
*
204-
*
205204
* @param integer $from
206205
* @return ElasticSearchQueryBuilder
207206
* @api
@@ -304,6 +303,7 @@ public function lessThanOrEqual($propertyName, $value)
304303
public function queryFilter($filterType, $filterOptions, $clauseType = 'must')
305304
{
306305
$this->request->queryFilter($filterType, $filterOptions, $clauseType);
306+
307307
return $this;
308308
}
309309

@@ -320,6 +320,7 @@ public function queryFilter($filterType, $filterOptions, $clauseType = 'must')
320320
public function appendAtPath($path, array $data)
321321
{
322322
$this->request->appendAtPath($path, $data);
323+
323324
return $this;
324325
}
325326

@@ -410,6 +411,7 @@ public function fieldBasedAggregation($name, $field, $type = "terms", $parentPat
410411
public function aggregation($name, array $aggregationDefinition, $parentPath = null)
411412
{
412413
$this->request->aggregation($name, $aggregationDefinition, $parentPath);
414+
413415
return $this;
414416
}
415417

@@ -464,6 +466,7 @@ public function termSuggestions($text, $field = '_all', $name = 'suggestions')
464466
public function suggestions($name, array $suggestionDefinition)
465467
{
466468
$this->request->suggestions($name, $suggestionDefinition);
469+
467470
return $this;
468471
}
469472

@@ -500,6 +503,7 @@ public function getTotalItems()
500503
if (isset($this->result['hits']['total'])) {
501504
return (int)$this->result['hits']['total'];
502505
}
506+
503507
return 0;
504508
}
505509

@@ -673,6 +677,7 @@ public function query(NodeInterface $contextNode)
673677
public function request($path, $requestPart)
674678
{
675679
$this->request->setByPath($path, $requestPart);
680+
676681
return $this;
677682
}
678683

@@ -747,6 +752,7 @@ public function __call($method, array $arguments)
747752
throw new Exception(sprintf('Method "%s" does not exist in the current Request object "%s"', $method, get_class($this->request)), 1486763515);
748753
}
749754
call_user_func_array([$this->request, $method], $arguments);
755+
750756
return $this;
751757
}
752758
}

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Exception.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
* source code.
1212
*/
1313

14-
use TYPO3\Flow\Annotations as Flow;
15-
1614
class Exception extends \TYPO3\Flow\Exception
1715
{
1816
}

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Exception/DriverConfigurationException.php

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

1414
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Exception;
15-
use TYPO3\Flow\Annotations as Flow;
1615

1716
/**
1817
* Elastic Driver Configuration exception

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Exception/QueryBuildingException.php

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

1414
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Exception;
15-
use TYPO3\Flow\Annotations as Flow;
1615

1716
/**
1817
* A Query Building Exception

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Factory/AbstractDriverSpecificObjectFactory.php

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

14-
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\DocumentDriverInterface;
1514
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\DriverInterface;
16-
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\IndexerDriverInterface;
17-
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\QueryInterface;
1815
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Exception\DriverConfigurationException;
1916
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\LoggerInterface;
2017
use TYPO3\Flow\Annotations as Flow;
@@ -63,6 +60,7 @@ protected function resolve($type)
6360
if (!isset($this->mapping[$version][$type]['arguments'])) {
6461
return new $className();
6562
}
63+
6664
return new $className(...array_values($this->mapping[$version][$type]['arguments']));
6765
}
6866
}

0 commit comments

Comments
 (0)