Skip to content

Commit 72299c2

Browse files
author
Martynas Sudintas
committed
ONGR strict psr fixes
1 parent ff89cdf commit 72299c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+120
-180
lines changed

Diff for: Annotation/Inherit.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ final class Inherit
2828
* Constructor.
2929
*
3030
* @param array $values
31-
*
31+
*
3232
* @throws \InvalidArgumentException
3333
*/
3434
public function __constructor(array $values)

Diff for: Annotation/MultiField.php

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace ONGR\ElasticsearchBundle\Annotation;
1313

14+
use Doctrine\Common\Annotations\Annotation\Required;
15+
1416
/**
1517
* Annotation that can be used to define multi-field parameters.
1618
*

Diff for: Annotation/Property.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace ONGR\ElasticsearchBundle\Annotation;
1313

14+
use Doctrine\Common\Annotations\Annotation\Required;
15+
1416
/**
1517
* Annotation used to check mapping type during the parsing process.
1618
*
@@ -74,16 +76,12 @@ final class Property
7476
public $fielddata;
7577

7678
/**
77-
* Object name to map.
78-
*
79-
* @var string
79+
* @var string Object name to map.
8080
*/
8181
public $objectName;
8282

8383
/**
84-
* OneToOne or OneToMany.
85-
*
86-
* @var bool
84+
* @var bool OneToOne or OneToMany.
8785
*/
8886
public $multiple;
8987

Diff for: Annotation/Skip.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ final class Skip
2626

2727
/**
2828
* Constructor.
29-
*
29+
*
3030
* @param array $values
31-
*
31+
*
3232
* @throws \InvalidArgumentException
3333
*/
3434
public function __constructor(array $values)

Diff for: Annotation/Suggester/AbstractSuggesterProperty.php

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace ONGR\ElasticsearchBundle\Annotation\Suggester;
1313

14+
use Doctrine\Common\Annotations\Annotation\Required;
15+
1416
/**
1517
* Abstract class for various suggester annotations.
1618
*/

Diff for: Annotation/Suggester/Context/AbstractContext.php

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace ONGR\ElasticsearchBundle\Annotation\Suggester\Context;
1313

14+
use Doctrine\Common\Annotations\Annotation\Required;
15+
1416
/**
1517
* Abstract class for various context annotations.
1618
*/

Diff for: Cache/WarmerInterface.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ interface WarmerInterface
2020
{
2121
/**
2222
* Warms up search using warmers api.
23-
*
23+
*
2424
* @param Search $search
25-
*
25+
*
2626
* @link http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-warmers.html
2727
*/
2828
public function warmUp(Search $search);
2929

3030
/**
3131
* Returns warmer name.
32-
*
32+
*
3333
* @return string
3434
*/
3535
public function getName();

Diff for: Cache/WarmersContainer.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class WarmersContainer
2525

2626
/**
2727
* Warms up the cache.
28-
*
28+
*
2929
* @return array
3030
*/
3131
public function getWarmers()
@@ -54,7 +54,7 @@ public function setWarmers(array $warmers)
5454

5555
/**
5656
* Adds cache warmer.
57-
*
57+
*
5858
* @param WarmerInterface $warmer
5959
*/
6060
public function addWarmer(WarmerInterface $warmer)

Diff for: Client/Connection.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public function scroll($scrollId, $scrollDuration)
216216

217217
/**
218218
* Creates fresh elasticsearch index.
219-
*
219+
*
220220
* @param bool $putWarmers Determines if warmers should be loaded.
221221
*/
222222
public function createIndex($putWarmers = false)
@@ -240,7 +240,7 @@ public function dropIndex()
240240

241241
/**
242242
* Tries to drop and create fresh elasticsearch index.
243-
*
243+
*
244244
* @param bool $putWarmers Determines if warmers should be loaded.
245245
*/
246246
public function dropAndCreateIndex($putWarmers = false)

Diff for: DSL/Aggregation/TopHitsAggregation.php

+3-9
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,17 @@ class TopHitsAggregation extends AbstractAggregation
2222
use MetricTrait;
2323

2424
/**
25-
* Number of top matching hits to return per bucket.
26-
*
27-
* @var int
25+
* @var int Number of top matching hits to return per bucket.
2826
*/
2927
private $size;
3028

3129
/**
32-
* The offset from the first result you want to fetch.
33-
*
34-
* @var int
30+
* @var int The offset from the first result you want to fetch.
3531
*/
3632
private $from;
3733

3834
/**
39-
* How the top matching hits should be sorted.
40-
*
41-
* @var Sorts
35+
* @var Sorts How the top matching hits should be sorted.
4236
*/
4337
private $sort;
4438

Diff for: DSL/Filter/AbstractFilter.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ abstract class AbstractFilter
2525
protected $filters;
2626

2727
/**
28-
* @param array $boolParams Bool parameters.
28+
* Initializes bool filter.
2929
*
30-
* @internal param bool $filters Filters collection.
30+
* @param array $boolParams Bool parameters.
3131
*/
3232
public function __construct($boolParams = [])
3333
{

Diff for: DSL/Filter/IndicesFilter.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
class IndicesFilter implements BuilderInterface
2020
{
2121
/**
22-
* @var string[] $indices
22+
* @var string[]
2323
*/
2424
private $indices;
2525

2626
/**
27-
* @var BuilderInterface $filter
27+
* @var BuilderInterface
2828
*/
2929
private $filter;
3030

Diff for: DSL/Highlight/Field.php

+11-25
Original file line numberDiff line numberDiff line change
@@ -23,63 +23,49 @@ class Field
2323
const TYPE_FVH = 'fvh';
2424

2525
/**
26-
* Field name.
27-
*
28-
* @var string
26+
* @var string Field name.
2927
*/
3028
protected $name;
3129

3230
/**
33-
* Highlighter type. By default 'plain'.
34-
*
35-
* @var string
31+
* @var string Highlighter type. By default 'plain'.
3632
*/
3733
protected $type;
3834

3935
/**
40-
* Size of the highlighted fragment in characters. By default 100.
41-
*
42-
* @var int
36+
* @var int Size of the highlighted fragment in characters. By default 100.
4337
*/
4438
protected $fragmentSize;
4539

4640
/**
47-
* Maximum number of fragments to return. By default 5.
48-
*
49-
* @var int
41+
* @var int Maximum number of fragments to return. By default 5.
5042
*/
5143
protected $numberOfFragments;
5244

5345
/**
54-
* Combine matches on multiple fields to highlight a single field.
55-
*
56-
* @var array
46+
* @var array Combine matches on multiple fields to highlight a single field.
5747
*/
5848
protected $matchedFields;
5949

6050
/**
61-
* Query to highlight.
62-
*
63-
* @var BuilderInterface
51+
* @var BuilderInterface Query to highlight.
6452
*/
6553
protected $highlightQuery;
6654

6755
/**
68-
* Show part of string even if there are no matches to highlight. Defaults to 0.
69-
*
70-
* @var int
56+
* @var int Show part of string even if there are no matches to highlight. Defaults to 0.
7157
*/
7258
protected $noMatchSize;
7359

7460
/**
75-
* Highlight fields based on the source.
76-
*
77-
* @var bool
61+
* @var bool Highlight fields based on the source.
7862
*/
7963
protected $forceSource;
8064

8165
/**
82-
* @param string $name
66+
* Creates a highlight for a field.
67+
*
68+
* @param string $name Field name.
8369
*/
8470
public function __construct($name)
8571
{

Diff for: DSL/Highlight/Highlight.php

+7-21
Original file line numberDiff line numberDiff line change
@@ -21,51 +21,37 @@ class Highlight
2121
const TYPE_FVH = 'fvh';
2222

2323
/**
24-
* Holds fields to highlight.
25-
*
26-
* @var array
24+
* @var array Holds fields to highlight.
2725
*/
2826
protected $fields = [];
2927

3028
/**
31-
* Holds html tag name and class that highlight will be put in (default 'em' tag).
32-
*
33-
* @var array
29+
* @var array Holds html tag name and class that highlight will be put in (default 'em' tag).
3430
*/
3531
protected $tags = [];
3632

3733
/**
38-
* Holds tag schema name. 'styled' is the only option yet.
39-
*
40-
* @var string
34+
* @var string Holds tag schema name. 'styled' is the only option yet.
4135
*/
4236
protected $tagsSchema = null;
4337

4438
/**
45-
* Fragments sort type.
46-
*
47-
* @var string
39+
* @var string Fragments sort type.
4840
*/
4941
protected $order = null;
5042

5143
/**
52-
* Highlighter type. By default plain.
53-
*
54-
* @var string
44+
* @var string Highlighter type. By default plain.
5545
*/
5646
protected $type = null;
5747

5848
/**
59-
* Size of the highlighted fragment in characters. By default 100.
60-
*
61-
* @var int
49+
* @var int Size of the highlighted fragment in characters. By default 100.
6250
*/
6351
protected $fragmentSize = null;
6452

6553
/**
66-
* Maximum number of fragments to return. By default 5.
67-
*
68-
* @var int
54+
* @var int Maximum number of fragments to return. By default 5.
6955
*/
7056
protected $numberOfFragments = null;
7157

Diff for: DSL/Query/FilteredQuery.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class FilteredQuery extends AbstractFilter implements BuilderInterface
2121
{
2222
/**
23-
* @var Query used inside filtered area.
23+
* @var Query Used inside filtered area.
2424
*/
2525
private $query;
2626

Diff for: DSL/Query/IndicesQuery.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
class IndicesQuery implements BuilderInterface
2020
{
2121
/**
22-
* @var string[] $indices
22+
* @var string[]
2323
*/
2424
private $indices;
2525

2626
/**
27-
* @var BuilderInterface $query
27+
* @var BuilderInterface
2828
*/
2929
private $query;
3030

Diff for: DSL/Query/Query.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class Query implements BuilderInterface
2121
{
2222
/**
23-
* @var BuilderInterface[] Queries
23+
* @var BuilderInterface[]
2424
*/
2525
private $queries;
2626

Diff for: DSL/Query/RangeQuery.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ class RangeQuery implements BuilderInterface
3030
const GTE = 'gte';
3131

3232
/**
33-
* Field name.
34-
*
35-
* @var string
33+
* @var string Field name.
3634
*/
3735
private $field;
3836

Diff for: DSL/Search.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Search
3131
const SCROLL_DURATION = '5m';
3232

3333
/**
34-
* @var Query $query
34+
* @var Query
3535
*/
3636
private $query;
3737

@@ -41,14 +41,12 @@ class Search
4141
private $boolQueryParams;
4242

4343
/**
44-
* @var BuilderInterface $filters
44+
* @var BuilderInterface
4545
*/
4646
private $filters;
4747

4848
/**
49-
* Filters collection.
50-
*
51-
* @var BuilderInterface $postFilters
49+
* @var BuilderInterface Filters collection.
5250
*/
5351
private $postFilters;
5452

0 commit comments

Comments
 (0)