diff --git a/Annotation/Inherit.php b/Annotation/Inherit.php index 6932c738..6ba8ae3c 100644 --- a/Annotation/Inherit.php +++ b/Annotation/Inherit.php @@ -28,7 +28,7 @@ final class Inherit * Constructor. * * @param array $values - * + * * @throws \InvalidArgumentException */ public function __constructor(array $values) diff --git a/Annotation/MultiField.php b/Annotation/MultiField.php index 0bd0e621..1fe65a23 100644 --- a/Annotation/MultiField.php +++ b/Annotation/MultiField.php @@ -11,6 +11,8 @@ namespace ONGR\ElasticsearchBundle\Annotation; +use Doctrine\Common\Annotations\Annotation\Required; + /** * Annotation that can be used to define multi-field parameters. * diff --git a/Annotation/Property.php b/Annotation/Property.php index 9d6c729b..db045758 100644 --- a/Annotation/Property.php +++ b/Annotation/Property.php @@ -11,6 +11,8 @@ namespace ONGR\ElasticsearchBundle\Annotation; +use Doctrine\Common\Annotations\Annotation\Required; + /** * Annotation used to check mapping type during the parsing process. * @@ -74,16 +76,12 @@ final class Property public $fielddata; /** - * Object name to map. - * - * @var string + * @var string Object name to map. */ public $objectName; /** - * OneToOne or OneToMany. - * - * @var bool + * @var bool OneToOne or OneToMany. */ public $multiple; diff --git a/Annotation/Skip.php b/Annotation/Skip.php index cff0f8ff..affb718d 100644 --- a/Annotation/Skip.php +++ b/Annotation/Skip.php @@ -26,9 +26,9 @@ final class Skip /** * Constructor. - * + * * @param array $values - * + * * @throws \InvalidArgumentException */ public function __constructor(array $values) diff --git a/Annotation/Suggester/AbstractSuggesterProperty.php b/Annotation/Suggester/AbstractSuggesterProperty.php index 53affdfc..adb64e51 100644 --- a/Annotation/Suggester/AbstractSuggesterProperty.php +++ b/Annotation/Suggester/AbstractSuggesterProperty.php @@ -11,6 +11,8 @@ namespace ONGR\ElasticsearchBundle\Annotation\Suggester; +use Doctrine\Common\Annotations\Annotation\Required; + /** * Abstract class for various suggester annotations. */ diff --git a/Annotation/Suggester/Context/AbstractContext.php b/Annotation/Suggester/Context/AbstractContext.php index 0e5568e3..1b2a6bee 100644 --- a/Annotation/Suggester/Context/AbstractContext.php +++ b/Annotation/Suggester/Context/AbstractContext.php @@ -11,6 +11,8 @@ namespace ONGR\ElasticsearchBundle\Annotation\Suggester\Context; +use Doctrine\Common\Annotations\Annotation\Required; + /** * Abstract class for various context annotations. */ diff --git a/Cache/WarmerInterface.php b/Cache/WarmerInterface.php index e937d83d..67e2f488 100644 --- a/Cache/WarmerInterface.php +++ b/Cache/WarmerInterface.php @@ -20,16 +20,16 @@ interface WarmerInterface { /** * Warms up search using warmers api. - * + * * @param Search $search - * + * * @link http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-warmers.html */ public function warmUp(Search $search); /** * Returns warmer name. - * + * * @return string */ public function getName(); diff --git a/Cache/WarmersContainer.php b/Cache/WarmersContainer.php index 7f47c729..d8fb1385 100644 --- a/Cache/WarmersContainer.php +++ b/Cache/WarmersContainer.php @@ -25,7 +25,7 @@ class WarmersContainer /** * Warms up the cache. - * + * * @return array */ public function getWarmers() @@ -54,7 +54,7 @@ public function setWarmers(array $warmers) /** * Adds cache warmer. - * + * * @param WarmerInterface $warmer */ public function addWarmer(WarmerInterface $warmer) diff --git a/Client/Connection.php b/Client/Connection.php index 93168a7c..e225283a 100644 --- a/Client/Connection.php +++ b/Client/Connection.php @@ -216,7 +216,7 @@ public function scroll($scrollId, $scrollDuration) /** * Creates fresh elasticsearch index. - * + * * @param bool $putWarmers Determines if warmers should be loaded. */ public function createIndex($putWarmers = false) @@ -240,7 +240,7 @@ public function dropIndex() /** * Tries to drop and create fresh elasticsearch index. - * + * * @param bool $putWarmers Determines if warmers should be loaded. */ public function dropAndCreateIndex($putWarmers = false) diff --git a/DSL/Aggregation/TopHitsAggregation.php b/DSL/Aggregation/TopHitsAggregation.php index 79a55efd..0dc099e8 100644 --- a/DSL/Aggregation/TopHitsAggregation.php +++ b/DSL/Aggregation/TopHitsAggregation.php @@ -22,23 +22,17 @@ class TopHitsAggregation extends AbstractAggregation use MetricTrait; /** - * Number of top matching hits to return per bucket. - * - * @var int + * @var int Number of top matching hits to return per bucket. */ private $size; /** - * The offset from the first result you want to fetch. - * - * @var int + * @var int The offset from the first result you want to fetch. */ private $from; /** - * How the top matching hits should be sorted. - * - * @var Sorts + * @var Sorts How the top matching hits should be sorted. */ private $sort; diff --git a/DSL/Filter/AbstractFilter.php b/DSL/Filter/AbstractFilter.php index 662f8519..bf5d837a 100644 --- a/DSL/Filter/AbstractFilter.php +++ b/DSL/Filter/AbstractFilter.php @@ -25,9 +25,9 @@ abstract class AbstractFilter protected $filters; /** - * @param array $boolParams Bool parameters. + * Initializes bool filter. * - * @internal param bool $filters Filters collection. + * @param array $boolParams Bool parameters. */ public function __construct($boolParams = []) { diff --git a/DSL/Filter/IndicesFilter.php b/DSL/Filter/IndicesFilter.php index a9c92dba..8e17a9cf 100644 --- a/DSL/Filter/IndicesFilter.php +++ b/DSL/Filter/IndicesFilter.php @@ -19,12 +19,12 @@ class IndicesFilter implements BuilderInterface { /** - * @var string[] $indices + * @var string[] */ private $indices; /** - * @var BuilderInterface $filter + * @var BuilderInterface */ private $filter; diff --git a/DSL/Highlight/Field.php b/DSL/Highlight/Field.php index de6360dd..51f9f470 100644 --- a/DSL/Highlight/Field.php +++ b/DSL/Highlight/Field.php @@ -23,63 +23,49 @@ class Field const TYPE_FVH = 'fvh'; /** - * Field name. - * - * @var string + * @var string Field name. */ protected $name; /** - * Highlighter type. By default 'plain'. - * - * @var string + * @var string Highlighter type. By default 'plain'. */ protected $type; /** - * Size of the highlighted fragment in characters. By default 100. - * - * @var int + * @var int Size of the highlighted fragment in characters. By default 100. */ protected $fragmentSize; /** - * Maximum number of fragments to return. By default 5. - * - * @var int + * @var int Maximum number of fragments to return. By default 5. */ protected $numberOfFragments; /** - * Combine matches on multiple fields to highlight a single field. - * - * @var array + * @var array Combine matches on multiple fields to highlight a single field. */ protected $matchedFields; /** - * Query to highlight. - * - * @var BuilderInterface + * @var BuilderInterface Query to highlight. */ protected $highlightQuery; /** - * Show part of string even if there are no matches to highlight. Defaults to 0. - * - * @var int + * @var int Show part of string even if there are no matches to highlight. Defaults to 0. */ protected $noMatchSize; /** - * Highlight fields based on the source. - * - * @var bool + * @var bool Highlight fields based on the source. */ protected $forceSource; /** - * @param string $name + * Creates a highlight for a field. + * + * @param string $name Field name. */ public function __construct($name) { diff --git a/DSL/Highlight/Highlight.php b/DSL/Highlight/Highlight.php index 683ffcc8..ba283610 100644 --- a/DSL/Highlight/Highlight.php +++ b/DSL/Highlight/Highlight.php @@ -21,51 +21,37 @@ class Highlight const TYPE_FVH = 'fvh'; /** - * Holds fields to highlight. - * - * @var array + * @var array Holds fields to highlight. */ protected $fields = []; /** - * Holds html tag name and class that highlight will be put in (default 'em' tag). - * - * @var array + * @var array Holds html tag name and class that highlight will be put in (default 'em' tag). */ protected $tags = []; /** - * Holds tag schema name. 'styled' is the only option yet. - * - * @var string + * @var string Holds tag schema name. 'styled' is the only option yet. */ protected $tagsSchema = null; /** - * Fragments sort type. - * - * @var string + * @var string Fragments sort type. */ protected $order = null; /** - * Highlighter type. By default plain. - * - * @var string + * @var string Highlighter type. By default plain. */ protected $type = null; /** - * Size of the highlighted fragment in characters. By default 100. - * - * @var int + * @var int Size of the highlighted fragment in characters. By default 100. */ protected $fragmentSize = null; /** - * Maximum number of fragments to return. By default 5. - * - * @var int + * @var int Maximum number of fragments to return. By default 5. */ protected $numberOfFragments = null; diff --git a/DSL/Query/FilteredQuery.php b/DSL/Query/FilteredQuery.php index b32b96a3..e216d266 100644 --- a/DSL/Query/FilteredQuery.php +++ b/DSL/Query/FilteredQuery.php @@ -20,7 +20,7 @@ class FilteredQuery extends AbstractFilter implements BuilderInterface { /** - * @var Query used inside filtered area. + * @var Query Used inside filtered area. */ private $query; diff --git a/DSL/Query/IndicesQuery.php b/DSL/Query/IndicesQuery.php index ac99ae2a..7b33ab35 100644 --- a/DSL/Query/IndicesQuery.php +++ b/DSL/Query/IndicesQuery.php @@ -19,12 +19,12 @@ class IndicesQuery implements BuilderInterface { /** - * @var string[] $indices + * @var string[] */ private $indices; /** - * @var BuilderInterface $query + * @var BuilderInterface */ private $query; diff --git a/DSL/Query/Query.php b/DSL/Query/Query.php index 26f07b6b..82481166 100644 --- a/DSL/Query/Query.php +++ b/DSL/Query/Query.php @@ -20,7 +20,7 @@ class Query implements BuilderInterface { /** - * @var BuilderInterface[] Queries + * @var BuilderInterface[] */ private $queries; diff --git a/DSL/Query/RangeQuery.php b/DSL/Query/RangeQuery.php index 6d06c81d..939212ac 100644 --- a/DSL/Query/RangeQuery.php +++ b/DSL/Query/RangeQuery.php @@ -30,9 +30,7 @@ class RangeQuery implements BuilderInterface const GTE = 'gte'; /** - * Field name. - * - * @var string + * @var string Field name. */ private $field; diff --git a/DSL/Search.php b/DSL/Search.php index ee7140b5..94316a4d 100644 --- a/DSL/Search.php +++ b/DSL/Search.php @@ -31,7 +31,7 @@ class Search const SCROLL_DURATION = '5m'; /** - * @var Query $query + * @var Query */ private $query; @@ -41,14 +41,12 @@ class Search private $boolQueryParams; /** - * @var BuilderInterface $filters + * @var BuilderInterface */ private $filters; /** - * Filters collection. - * - * @var BuilderInterface $postFilters + * @var BuilderInterface Filters collection. */ private $postFilters; diff --git a/DSL/Sort/GeoSort.php b/DSL/Sort/GeoSort.php index 1264ed92..068de8c7 100644 --- a/DSL/Sort/GeoSort.php +++ b/DSL/Sort/GeoSort.php @@ -29,9 +29,7 @@ class GeoSort extends AbstractSort protected $location; /** - * Units in which to measure distance. - * - * @var string + * @var string Units in which to measure distance. */ protected $unit; diff --git a/DSL/Sort/ScriptSort.php b/DSL/Sort/ScriptSort.php index 29e4cfd8..96118059 100644 --- a/DSL/Sort/ScriptSort.php +++ b/DSL/Sort/ScriptSort.php @@ -20,16 +20,12 @@ class ScriptSort extends AbstractSort { /** - * Script to execute. - * - * @var string + * @var string Script to execute. */ private $script; /** - * Type returned (number, string). - * - * @var string + * @var string Type returned (number, string). */ private $returnType; diff --git a/DSL/Sort/Sort.php b/DSL/Sort/Sort.php index b85770f8..04be3b21 100644 --- a/DSL/Sort/Sort.php +++ b/DSL/Sort/Sort.php @@ -19,9 +19,7 @@ class Sort extends AbstractSort { /** - * Filter for sorting. - * - * @var BuilderInterface + * @var BuilderInterface Filter for sorting. */ private $nestedFilter; diff --git a/DSL/Sort/Sorts.php b/DSL/Sort/Sorts.php index 52616191..f4bc32d7 100644 --- a/DSL/Sort/Sorts.php +++ b/DSL/Sort/Sorts.php @@ -19,9 +19,7 @@ class Sorts implements BuilderInterface { /** - * Sorts collection. - * - * @var AbstractSort[] + * @var AbstractSort[] Sorts collection. */ private $sorts = []; diff --git a/DSL/Suggester/Completion.php b/DSL/Suggester/Completion.php index 767d6bb9..bd045e25 100644 --- a/DSL/Suggester/Completion.php +++ b/DSL/Suggester/Completion.php @@ -87,7 +87,7 @@ public function toArray() $this->getName() => [ 'text' => $this->getText(), 'completion' => $completion, - ] + ], ]; } diff --git a/DSL/Suggester/Context.php b/DSL/Suggester/Context.php index 06c16108..af7ac4bc 100644 --- a/DSL/Suggester/Context.php +++ b/DSL/Suggester/Context.php @@ -24,9 +24,7 @@ class Context extends AbstractSuggester private $context; /** - * Size of completion. - * - * @var int + * @var int Size of completion. */ private $size; @@ -93,7 +91,7 @@ public function toArray() $this->getName() => [ 'text' => $this->getText(), 'completion' => $completion, - ] + ], ]; } diff --git a/DSL/Suggester/Context/AbstractContext.php b/DSL/Suggester/Context/AbstractContext.php index f9f0a724..7dc69da8 100644 --- a/DSL/Suggester/Context/AbstractContext.php +++ b/DSL/Suggester/Context/AbstractContext.php @@ -17,16 +17,12 @@ abstract class AbstractContext { /** - * Name of the context used. - * - * @var string + * @var string Name of the context used. */ private $name; /** - * Value of the context. - * - * @var string|array + * @var string|array Value of the context. */ private $value; diff --git a/DSL/Suggester/Phrase.php b/DSL/Suggester/Phrase.php index 7c2adb95..95b182e4 100644 --- a/DSL/Suggester/Phrase.php +++ b/DSL/Suggester/Phrase.php @@ -85,7 +85,7 @@ public function toArray() $this->getName() => [ 'text' => $this->getText(), 'phrase' => array_filter($phrase), - ] + ], ]; } diff --git a/DataCollector/ElasticsearchDataCollector.php b/DataCollector/ElasticsearchDataCollector.php index 539112fd..dfb77ad2 100644 --- a/DataCollector/ElasticsearchDataCollector.php +++ b/DataCollector/ElasticsearchDataCollector.php @@ -170,7 +170,7 @@ private function addTime($time) /** * Adds query to collected data array. - * + * * @param string $route * @param array $record * @param string $queryBody diff --git a/Document/Suggester/SuggesterTrait.php b/Document/Suggester/SuggesterTrait.php index dbc2f955..26cc50c0 100644 --- a/Document/Suggester/SuggesterTrait.php +++ b/Document/Suggester/SuggesterTrait.php @@ -17,36 +17,28 @@ trait SuggesterTrait { /** - * Input to store. - * - * @var string[]|string + * @var string[]|string Input to store. * * @ES\Property(type="string", name="input") */ private $input; /** - * String to return. - * - * @var string + * @var string String to return. * * @ES\Property(type="string", name="output") */ private $output; /** - * Object to be returned in the suggest option. - * - * @var object + * @var object Object to be returned in the suggest option. * * @ES\Property(type="object", name="payload") */ private $payload; /** - * Weight used to rank suggestions. - * - * @var int|string + * @var int|string Weight used to rank suggestions. * * @ES\Property(type="string", name="weight") */ diff --git a/Result/AbstractResultsIterator.php b/Result/AbstractResultsIterator.php index 14bb423d..bb900f2a 100644 --- a/Result/AbstractResultsIterator.php +++ b/Result/AbstractResultsIterator.php @@ -17,16 +17,12 @@ abstract class AbstractResultsIterator implements \Countable, \Iterator, \ArrayAccess { /** - * Raw documents. - * - * @var array + * @var array Raw documents. */ protected $documents = []; /** - * Documents casted to objects cache. - * - * @var array + * @var array Documents casted to objects cache. */ protected $converted = []; diff --git a/Result/Aggregation/ValueAggregation.php b/Result/Aggregation/ValueAggregation.php index 86686680..e050f2ea 100644 --- a/Result/Aggregation/ValueAggregation.php +++ b/Result/Aggregation/ValueAggregation.php @@ -24,9 +24,7 @@ class ValueAggregation private $rawData; /** - * Extracted aggregation value. - * - * @var array + * @var array Extracted aggregation value. */ private $value; diff --git a/Result/Suggestion/SuggestionEntry.php b/Result/Suggestion/SuggestionEntry.php index ce18551c..24565486 100644 --- a/Result/Suggestion/SuggestionEntry.php +++ b/Result/Suggestion/SuggestionEntry.php @@ -39,10 +39,10 @@ class SuggestionEntry /** * Constructor. * - * @param string $text - * @param int $offset - * @param int $length - * @param OptionIterator $options + * @param string $text + * @param int $offset + * @param int $length + * @param OptionIterator $options */ public function __construct($text, $offset, $length, OptionIterator $options) { diff --git a/Service/Json/JsonReader.php b/Service/Json/JsonReader.php index 4de2d3fe..52a8e6ac 100644 --- a/Service/Json/JsonReader.php +++ b/Service/Json/JsonReader.php @@ -28,7 +28,7 @@ class JsonReader implements \Countable, \Iterator private $filename; /** - * @var resource A file system pointer resource + * @var resource A file system pointer resource. */ private $handle; diff --git a/Service/Json/JsonWriter.php b/Service/Json/JsonWriter.php index 67c76e9b..98853981 100644 --- a/Service/Json/JsonWriter.php +++ b/Service/Json/JsonWriter.php @@ -31,7 +31,7 @@ class JsonWriter private $filename; /** - * @var resource A file system pointer resource + * @var resource A file system pointer resource. */ private $handle; @@ -41,7 +41,7 @@ class JsonWriter private $metadata; /** - * @var int Current record number + * @var int Current record number. */ private $currentPosition = 0; diff --git a/Test/ElasticsearchTestCase.php b/Test/ElasticsearchTestCase.php index 657134c1..472843bb 100644 --- a/Test/ElasticsearchTestCase.php +++ b/Test/ElasticsearchTestCase.php @@ -22,9 +22,7 @@ abstract class ElasticsearchTestCase extends WebTestCase { /** - * Holds used managers. - * - * @var Manager[] + * @var Manager[] Holds used managers. */ private $managers = []; diff --git a/Tests/Functional/Client/ConnectionTest.php b/Tests/Functional/Client/ConnectionTest.php index 45aaf6e2..2606feff 100644 --- a/Tests/Functional/Client/ConnectionTest.php +++ b/Tests/Functional/Client/ConnectionTest.php @@ -141,8 +141,8 @@ private function getTestMapping() 'index' => 'not_analyzed', ], 'title' => ['type' => 'string'], - ] - ] + ], + ], ]; } diff --git a/Tests/Functional/Command/CacheClearCommandTest.php b/Tests/Functional/Command/CacheClearCommandTest.php index acbed36d..5c0363ab 100644 --- a/Tests/Functional/Command/CacheClearCommandTest.php +++ b/Tests/Functional/Command/CacheClearCommandTest.php @@ -39,7 +39,7 @@ public function testExecute() /** * Tests if exception is thown when no connection is found. - * + * * @expectedException \RuntimeException */ public function testExecuteException() @@ -58,7 +58,7 @@ public function testExecuteException() /** * Returns cache clear command instance. - * + * * @return CacheClearCommand */ private function getCommand() diff --git a/Tests/Functional/Command/IndexExportCommandTest.php b/Tests/Functional/Command/IndexExportCommandTest.php index 61cb3455..b85d7bd4 100644 --- a/Tests/Functional/Command/IndexExportCommandTest.php +++ b/Tests/Functional/Command/IndexExportCommandTest.php @@ -76,12 +76,16 @@ public function testIndexExport() [ '_id' => '1', '_type' => 'foocontent', - '_source' => ['header' => 'test_1'] + '_source' => [ + 'header' => 'test_1', + ], ], [ '_id' => '2', '_type' => 'foocontent', - '_source' => ['header' => 'test_2'] + '_source' => [ + 'header' => 'test_2', + ], ], [ '_id' => '1', @@ -89,7 +93,7 @@ public function testIndexExport() '_source' => [ 'title' => 'foo', 'price' => 10.45, - ] + ], ], [ '_id' => '2', @@ -97,7 +101,7 @@ public function testIndexExport() '_source' => [ 'title' => 'bar', 'price' => 32, - ] + ], ], ]; diff --git a/Tests/Functional/Command/WarmerPutCommandTest.php b/Tests/Functional/Command/WarmerPutCommandTest.php index 513b0896..c8b50d8d 100644 --- a/Tests/Functional/Command/WarmerPutCommandTest.php +++ b/Tests/Functional/Command/WarmerPutCommandTest.php @@ -34,10 +34,10 @@ public function getTestExecuteData() /** * Tests if warmers are being put into index if command is executed. - * + * * @param string $expected * @param array $arguments - * + * * @dataProvider getTestExecuteData */ public function testExecute($expected, $arguments = []) diff --git a/Tests/Functional/DSL/Aggregation/RangeAggregationTest.php b/Tests/Functional/DSL/Aggregation/RangeAggregationTest.php index f399c9a9..c1bcc704 100644 --- a/Tests/Functional/DSL/Aggregation/RangeAggregationTest.php +++ b/Tests/Functional/DSL/Aggregation/RangeAggregationTest.php @@ -61,7 +61,7 @@ public function getRangeAggregationData() 'range' => [ 'from' => '10', 'to' => 20, - ] + ], ]; $result = [ @@ -100,8 +100,8 @@ public function getRangeAggregationData() 'range' => [ 'from' => 15, 'to' => null, - ] - ] + ], + ], ]; $result = [ diff --git a/Tests/Functional/DSL/Aggregation/StatsAggregationTest.php b/Tests/Functional/DSL/Aggregation/StatsAggregationTest.php index eb102516..731511ca 100644 --- a/Tests/Functional/DSL/Aggregation/StatsAggregationTest.php +++ b/Tests/Functional/DSL/Aggregation/StatsAggregationTest.php @@ -66,7 +66,7 @@ public function testStatsAggregation() 'max' => 32, 'sum' => 57.55, 'avg' => 19.18, - ] + ], ]; $this->assertArrayHasKey('aggregations', $results); diff --git a/Tests/Functional/DSL/Query/FunctionScoreQueryTest.php b/Tests/Functional/DSL/Query/FunctionScoreQueryTest.php index cb4382c5..b3e0dd6f 100644 --- a/Tests/Functional/DSL/Query/FunctionScoreQueryTest.php +++ b/Tests/Functional/DSL/Query/FunctionScoreQueryTest.php @@ -67,7 +67,7 @@ public function testFunctionScoreQuery() 'field' => 'price', 'factor' => 1.2, 'modifier' => 'sqrt', - ] + ], ]; $functionScoreQuery = new FunctionScoreQuery(new MatchAllQuery(), $functions, ['boost' => 1]); diff --git a/Tests/Functional/DSL/SearchTest.php b/Tests/Functional/DSL/SearchTest.php index a95e9c28..5a1bf07f 100644 --- a/Tests/Functional/DSL/SearchTest.php +++ b/Tests/Functional/DSL/SearchTest.php @@ -26,7 +26,7 @@ class SearchTest extends ElasticsearchTestCase { /** - * @var Repository $repository + * @var Repository */ protected $repository; diff --git a/Tests/Functional/ORM/RepositoryTest.php b/Tests/Functional/ORM/RepositoryTest.php index c69fe55e..97c66448 100644 --- a/Tests/Functional/ORM/RepositoryTest.php +++ b/Tests/Functional/ORM/RepositoryTest.php @@ -95,7 +95,7 @@ public function getFindByData() 'title' => [ 'foo', 'bar', - ] + ], ], ]; @@ -106,7 +106,7 @@ public function getFindByData() 'title' => [ 'foo', 'bar', - ] + ], ], ['title' => 'asc'], ]; @@ -397,7 +397,7 @@ public function getSuggestData() new TermOption('distributed', 0.0, 1), ], ], - ] + ], ]; $suggesters = [new Term('description', 'distibutd')]; @@ -412,7 +412,7 @@ public function getSuggestData() 'length' => '9', 'options' => [new SimpleOption('lorem adip', 0.0)], ], - ] + ], ]; $suggesters = [new Phrase('description', 'Lorm adip')]; @@ -433,7 +433,7 @@ public function getSuggestData() 'length' => '4', 'options' => [new CompletionOption('Lorem ipsum', 0.0, ['test' => true])], ], - ] + ], ]; $out[] = ['suggesters' => $context, 'expectedResults' => $expectedResults]; @@ -448,7 +448,7 @@ public function getSuggestData() 'length' => '5', 'options' => [new SimpleOption('Lorem ipsum', 0.0, null)], ], - ] + ], ]; $out[] = ['suggesters' => $completion, 'expectedResults' => $expectedResults]; @@ -500,7 +500,7 @@ public function getSuggestData() 'length' => '5', 'options' => [new SimpleOption('Lorem ipsum', 0.0, null)], ], - ] + ], ]; $out[] = ['suggesters' => $suggesters, 'expectedResults' => $expectedResults]; diff --git a/Tests/Unit/DSL/Aggregation/TopHitsAggregationTest.php b/Tests/Unit/DSL/Aggregation/TopHitsAggregationTest.php index cdb12cb7..11c9afa9 100644 --- a/Tests/Unit/DSL/Aggregation/TopHitsAggregationTest.php +++ b/Tests/Unit/DSL/Aggregation/TopHitsAggregationTest.php @@ -32,7 +32,9 @@ public function testToArray() $expectedAgg->from = 1; $expectedAgg->sort = $sorts->toArray(); $expected = [ - 'agg_test' => ['top_hits' => $expectedAgg] + 'agg_test' => [ + 'top_hits' => $expectedAgg, + ], ]; $this->assertEquals($expected, $aggregation->toArray()); diff --git a/Tests/Unit/Result/Aggregation/HitsAggregationIteratorTest.php b/Tests/Unit/Result/Aggregation/HitsAggregationIteratorTest.php index 782128d9..346a8d84 100644 --- a/Tests/Unit/Result/Aggregation/HitsAggregationIteratorTest.php +++ b/Tests/Unit/Result/Aggregation/HitsAggregationIteratorTest.php @@ -117,7 +117,7 @@ public function testOffsetExists() { $hits = new HitsAggregationIterator( [ - 'hits' => [[]] + 'hits' => [[]], ], null ); diff --git a/Tests/Unit/Service/JsonFormatterTest.php b/Tests/Unit/Service/JsonFormatterTest.php index 680d1b6f..ffeb706b 100644 --- a/Tests/Unit/Service/JsonFormatterTest.php +++ b/Tests/Unit/Service/JsonFormatterTest.php @@ -17,7 +17,7 @@ class JsonFormatterTest extends \PHPUnit_Framework_TestCase { /** * Data provider for testPrettify. - * + * * @return array */ public function getTestPrettifyData() @@ -27,7 +27,7 @@ public function getTestPrettifyData() // Case #0: simple. $data0 = [ 'total' => 0, - 'raw' => [] + 'raw' => [], ]; $pretty0 = $this->getFileContents('formatted_0.json'); $out[] = [ @@ -45,15 +45,15 @@ public function getTestPrettifyData() ['_id' => 1], ['_id' => 2], ], - [ + 0 => [ 'level1' => [ 'level2' => [ 'level3' => [ - 'level4' => [] - ] - ] - ] - ] + 'level4' => [], + ], + ], + ], + ], ]; $pretty1 = $this->getFileContents('formatted_1.json'); $out[] = [ @@ -87,7 +87,7 @@ public function testPrettify($inlineJson, $prettyJson) /** * Returns file contents from fixture. - * + * * @param string $filename * * @return string