diff --git a/bundle/Command/SolrCreateIndexCommand.php b/bundle/Command/SolrCreateIndexCommand.php index 55111143c..f81d52444 100644 --- a/bundle/Command/SolrCreateIndexCommand.php +++ b/bundle/Command/SolrCreateIndexCommand.php @@ -60,15 +60,15 @@ protected function execute(InputInterface $input, OutputInterface $output) $purge = !$input->getOption('no-purge'); $bulkCount = $input->getArgument('bulk_count'); if (!is_numeric($bulkCount) || (int)$bulkCount < 1) { - throw new RuntimeException("'bulk_count' argument should be > 0, got '{$bulkCount}'"); + throw new RuntimeException("The 'bulk_count' argument should be > 0. You provided '{$bulkCount}'"); } /** @var \eZ\Publish\SPI\Search\Handler $searchHandler */ $searchHandler = $this->getContainer()->get('ezpublish.spi.search'); if (!$searchHandler instanceof SolrSearchEngineHandler) { throw new RuntimeException( - 'Expected to find Solr Search Engine but found something else. ' . - "Did you forget to configure the repository with 'solr' search engine?" + 'Did not find Solr Search Engine. ' . + "Did you configure the Repository with the 'solr' search engine?" ); } diff --git a/lib/Container/Compiler/CoreFilterRegistryPass.php b/lib/Container/Compiler/CoreFilterRegistryPass.php index 838b04dc1..141d6683f 100644 --- a/lib/Container/Compiler/CoreFilterRegistryPass.php +++ b/lib/Container/Compiler/CoreFilterRegistryPass.php @@ -32,8 +32,8 @@ public function process(ContainerBuilder $container): void foreach ($attributes as $attribute) { if (!isset($attribute['connection'])) { throw new LogicException( - "'ezpublish.search.solr.core_filter' service tag needs an 'connection' attribute " . - 'to identify the Gateway. None given.' + "'ezpublish.search.solr.core_filter' service tag needs a 'connection' attribute " . + 'to identify the Gateway.' ); } diff --git a/lib/Container/Compiler/EndpointRegistryPass.php b/lib/Container/Compiler/EndpointRegistryPass.php index bf7013f95..c7109bb75 100644 --- a/lib/Container/Compiler/EndpointRegistryPass.php +++ b/lib/Container/Compiler/EndpointRegistryPass.php @@ -46,7 +46,7 @@ public function process(ContainerBuilder $container) if (!isset($attribute['alias'])) { throw new LogicException( "'ezpublish.search.solr.endpoint' service tag needs an 'alias' attribute " . - 'to identify the Endpoint. None given.' + 'to identify the endpoint.' ); } diff --git a/lib/Container/Compiler/GatewayRegistryPass.php b/lib/Container/Compiler/GatewayRegistryPass.php index 2a0a82c53..7807e86e1 100644 --- a/lib/Container/Compiler/GatewayRegistryPass.php +++ b/lib/Container/Compiler/GatewayRegistryPass.php @@ -32,8 +32,8 @@ public function process(ContainerBuilder $container): void foreach ($attributes as $attribute) { if (!isset($attribute['connection'])) { throw new LogicException( - "'ezpublish.search.solr.gateway' service tag needs an 'connection' attribute " . - 'to identify the Gateway. None given.' + "'ezpublish.search.solr.gateway' service tag needs a 'connection' attribute " . + 'to identify the Gateway.' ); } diff --git a/lib/Gateway/EndpointRegistry.php b/lib/Gateway/EndpointRegistry.php index b9d7f6026..e30da8a7e 100644 --- a/lib/Gateway/EndpointRegistry.php +++ b/lib/Gateway/EndpointRegistry.php @@ -57,7 +57,7 @@ public function registerEndpoint($name, Endpoint $endpoint) public function getEndpoint($name) { if (!isset($this->endpoint[$name])) { - throw new OutOfBoundsException("No Endpoint registered for '{$name}'."); + throw new OutOfBoundsException("No endpoint registered for '{$name}'."); } return $this->endpoint[$name]; diff --git a/lib/Gateway/EndpointResolver/NativeEndpointResolver.php b/lib/Gateway/EndpointResolver/NativeEndpointResolver.php index 09c681401..07443735a 100644 --- a/lib/Gateway/EndpointResolver/NativeEndpointResolver.php +++ b/lib/Gateway/EndpointResolver/NativeEndpointResolver.php @@ -85,7 +85,7 @@ public function __construct( public function getEntryEndpoint() { if (empty($this->entryEndpoints)) { - throw new RuntimeException('Not entry endpoints defined'); + throw new RuntimeException('No entry endpoints defined'); } return reset($this->entryEndpoints); diff --git a/lib/Handler.php b/lib/Handler.php index 30ade8eca..861aa66f5 100644 --- a/lib/Handler.php +++ b/lib/Handler.php @@ -174,9 +174,9 @@ public function findSingle(Criterion $filter, array $languageFilter = array()) ); if (!$result->totalCount) { - throw new NotFoundException('Content', 'findSingle() found no content for given $filter'); + throw new NotFoundException('Content', 'findSingle() found no content for the given $filter'); } elseif ($result->totalCount > 1) { - throw new InvalidArgumentException('totalCount', 'findSingle() found more then one item for given $filter'); + throw new InvalidArgumentException('totalCount', 'findSingle() found more then one Content item for the given $filter'); } $first = reset($result->searchHits); diff --git a/lib/Query/Common/CriterionVisitor/Field/FieldIn.php b/lib/Query/Common/CriterionVisitor/Field/FieldIn.php index 85e4e504c..5487d0f06 100644 --- a/lib/Query/Common/CriterionVisitor/Field/FieldIn.php +++ b/lib/Query/Common/CriterionVisitor/Field/FieldIn.php @@ -52,7 +52,7 @@ public function visit(Criterion $criterion, CriterionVisitor $subVisitor = null) if (empty($searchFields)) { throw new InvalidArgumentException( '$criterion->target', - "No searchable fields found for the given criterion target '{$criterion->target}'." + "No searchable Fields found for the provided Criterion target '{$criterion->target}'." ); } diff --git a/lib/Query/Common/CriterionVisitor/Field/FieldLike.php b/lib/Query/Common/CriterionVisitor/Field/FieldLike.php index d34929764..6c17c1051 100644 --- a/lib/Query/Common/CriterionVisitor/Field/FieldLike.php +++ b/lib/Query/Common/CriterionVisitor/Field/FieldLike.php @@ -48,7 +48,7 @@ public function visit(Criterion $criterion, CriterionVisitor $subVisitor = null) if (empty($searchFields)) { throw new InvalidArgumentException( '$criterion->target', - "No searchable fields found for the given criterion target '{$criterion->target}'." + "No searchable Fields found for the provided Criterion target '{$criterion->target}'." ); } diff --git a/lib/Query/Common/CriterionVisitor/Field/FieldRange.php b/lib/Query/Common/CriterionVisitor/Field/FieldRange.php index a067d87e4..bf98ab168 100644 --- a/lib/Query/Common/CriterionVisitor/Field/FieldRange.php +++ b/lib/Query/Common/CriterionVisitor/Field/FieldRange.php @@ -56,7 +56,7 @@ public function visit(Criterion $criterion, CriterionVisitor $subVisitor = null) if (empty($searchFields)) { throw new InvalidArgumentException( '$criterion->target', - "No searchable fields found for the given criterion target '{$criterion->target}'." + "No searchable Fields found for the provided Criterion target '{$criterion->target}'." ); } diff --git a/lib/Query/Common/CriterionVisitor/Field/FieldRelation.php b/lib/Query/Common/CriterionVisitor/Field/FieldRelation.php index 828675862..a288b19f6 100644 --- a/lib/Query/Common/CriterionVisitor/Field/FieldRelation.php +++ b/lib/Query/Common/CriterionVisitor/Field/FieldRelation.php @@ -53,7 +53,7 @@ public function visit(Criterion $criterion, CriterionVisitor $subVisitor = null) if (empty($searchFields)) { throw new InvalidArgumentException( '$criterion->target', - "No searchable fields found for the given criterion target '{$criterion->target}'." + "No searchable Fields found for the provided Criterion target '{$criterion->target}'." ); } diff --git a/lib/Query/Common/CriterionVisitor/MapLocation/MapLocationDistanceIn.php b/lib/Query/Common/CriterionVisitor/MapLocation/MapLocationDistanceIn.php index 7e235efe5..b2ec4d4d6 100644 --- a/lib/Query/Common/CriterionVisitor/MapLocation/MapLocationDistanceIn.php +++ b/lib/Query/Common/CriterionVisitor/MapLocation/MapLocationDistanceIn.php @@ -62,7 +62,7 @@ public function visit(Criterion $criterion, CriterionVisitor $subVisitor = null) if (empty($searchFields)) { throw new InvalidArgumentException( '$criterion->target', - "No searchable fields found for the given criterion target '{$criterion->target}'." + "No searchable Fields found for the provided Criterion target '{$criterion->target}'." ); } diff --git a/lib/Query/Common/CriterionVisitor/MapLocation/MapLocationDistanceRange.php b/lib/Query/Common/CriterionVisitor/MapLocation/MapLocationDistanceRange.php index 0eec6b721..84045f983 100644 --- a/lib/Query/Common/CriterionVisitor/MapLocation/MapLocationDistanceRange.php +++ b/lib/Query/Common/CriterionVisitor/MapLocation/MapLocationDistanceRange.php @@ -72,7 +72,7 @@ public function visit(Criterion $criterion, CriterionVisitor $subVisitor = null) if (empty($searchFields)) { throw new InvalidArgumentException( '$criterion->target', - "No searchable fields found for the given criterion target '{$criterion->target}'." + "No searchable Fields found for the provided Criterion target '{$criterion->target}'." ); } diff --git a/lib/Query/Common/SortClauseVisitor/Field.php b/lib/Query/Common/SortClauseVisitor/Field.php index 6f3e32f2a..d1c9903d7 100644 --- a/lib/Query/Common/SortClauseVisitor/Field.php +++ b/lib/Query/Common/SortClauseVisitor/Field.php @@ -93,7 +93,7 @@ public function visit(SortClause $sortClause) if ($fieldName === null) { throw new InvalidArgumentException( '$sortClause->targetData', - 'No searchable fields found for the given sort clause target ' . + 'No searchable Fields found for the provided Sort Clause target ' . "'{$target->fieldIdentifier}' on '{$target->typeIdentifier}'." ); } diff --git a/lib/Query/Common/SortClauseVisitor/MapLocationDistance.php b/lib/Query/Common/SortClauseVisitor/MapLocationDistance.php index ab821da6d..02655fd12 100644 --- a/lib/Query/Common/SortClauseVisitor/MapLocationDistance.php +++ b/lib/Query/Common/SortClauseVisitor/MapLocationDistance.php @@ -105,7 +105,7 @@ public function visit(SortClause $sortClause) if ($fieldName === null) { throw new InvalidArgumentException( '$sortClause->targetData', - 'No searchable fields found for the given sort clause target ' . + 'No searchable Fields found for the provided Sort Clause target ' . "'{$target->fieldIdentifier}' on '{$target->typeIdentifier}'." ); } diff --git a/lib/Query/FacetBuilderVisitor.php b/lib/Query/FacetBuilderVisitor.php index 1704a3f73..71f6ae311 100644 --- a/lib/Query/FacetBuilderVisitor.php +++ b/lib/Query/FacetBuilderVisitor.php @@ -28,7 +28,7 @@ abstract class FacetBuilderVisitor */ public function canMap($field) { - throw new \LogicException('Deprecated in favour of FacetFieldVisitor, and not in use if that is implemented'); + throw new \LogicException('Deprecated in favour of FacetFieldVisitor, not in use if FacetFieldVisitor is implemented'); } /** @@ -43,7 +43,7 @@ public function canMap($field) */ public function map($field, array $data) { - throw new \LogicException('Deprecated in favour of FacetFieldVisitor, and not in use if that is implemented'); + throw new \LogicException('Deprecated in favour of FacetFieldVisitor, not in use if FacetFieldVisitor is implemented'); } /** @@ -66,7 +66,7 @@ abstract public function canVisit(FacetBuilder $facetBuilder); */ public function visit(FacetBuilder $facetBuilder) { - throw new \LogicException('Deprecated in favour of FacetFieldVisitor, and not in use if that is implemented'); + throw new \LogicException('Deprecated in favour of FacetFieldVisitor, not in use if FacetFieldVisitor is implemented'); } /**