Skip to content

Commit df7fc30

Browse files
committed
Merge pull request #37 from Flowpack/task-psr2-header
[TASK] Reformat code to PSR-2 + normalize file header comment
2 parents f645237 + 3d8a299 commit df7fc30

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

+3214
-3093
lines changed

.styleci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
preset: psr2
2+
3+
finder:
4+
path:
5+
- "Classes"
6+
- "Tests"
Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,35 @@
11
<?php
22
namespace Flowpack\ElasticSearch\Annotations;
33

4-
/* *
5-
* This script belongs to the TYPO3 Flow package "Flowpack.ElasticSearch".*
6-
* *
7-
* It is free software; you can redistribute it and/or modify it under *
8-
* the terms of the GNU Lesser General Public License, either version 3 *
9-
* of the License, or (at your option) any later version. *
10-
* *
11-
* The TYPO3 project - inspiring people to share! *
12-
* */
4+
/*
5+
* This file is part of the Flowpack.ElasticSearch package.
6+
*
7+
* (c) Contributors of the Flowpack Team - flowpack.org
8+
*
9+
* This package is Open Source Software. For the full copyright and license
10+
* information, please view the LICENSE file which was distributed with this
11+
* source code.
12+
*/
1313

1414
use Doctrine\Common\Annotations\Annotation as DoctrineAnnotation;
1515

1616
/**
1717
* @Annotation
1818
* @DoctrineAnnotation\Target({"CLASS", "PROPERTY"})
1919
*/
20-
final class Indexable {
21-
22-
/**
23-
* The name of the index this object has to be stored to, if target is CLASS
24-
*
25-
* @var string
26-
*/
27-
public $indexName;
20+
final class Indexable
21+
{
22+
/**
23+
* The name of the index this object has to be stored to, if target is CLASS
24+
*
25+
* @var string
26+
*/
27+
public $indexName;
2828

29-
/**
30-
* The type this object has to be stored as, if target is CLASS
31-
*
32-
* @var string
33-
*/
34-
public $typeName;
29+
/**
30+
* The type this object has to be stored as, if target is CLASS
31+
*
32+
* @var string
33+
*/
34+
public $typeName;
3535
}
36-
Lines changed: 98 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,118 @@
11
<?php
22
namespace Flowpack\ElasticSearch\Annotations;
33

4-
/* *
5-
* This script belongs to the TYPO3 Flow package "Flowpack.ElasticSearch".*
6-
* *
7-
* It is free software; you can redistribute it and/or modify it under *
8-
* the terms of the GNU Lesser General Public License, either version 3 *
9-
* of the License, or (at your option) any later version. *
10-
* *
11-
* The TYPO3 project - inspiring people to share! *
12-
* */
4+
/*
5+
* This file is part of the Flowpack.ElasticSearch package.
6+
*
7+
* (c) Contributors of the Flowpack Team - flowpack.org
8+
*
9+
* This package is Open Source Software. For the full copyright and license
10+
* information, please view the LICENSE file which was distributed with this
11+
* source code.
12+
*/
1313

1414
use Doctrine\Common\Annotations\Annotation as DoctrineAnnotation;
1515

1616
/**
1717
* @Annotation
1818
* @DoctrineAnnotation\Target("PROPERTY")
1919
*/
20-
final class Mapping {
21-
22-
/**
23-
* The name of the field that will be stored in the index.
24-
* Defaults to the property/field name.
25-
*
26-
* @var string
27-
* @see http://www.elasticsearch.org/guide/reference/mapping/core-types.html
28-
*/
29-
public $index_name;
20+
final class Mapping
21+
{
22+
/**
23+
* The name of the field that will be stored in the index.
24+
* Defaults to the property/field name.
25+
*
26+
* @var string
27+
* @see http://www.elasticsearch.org/guide/reference/mapping/core-types.html
28+
*/
29+
public $index_name;
3030

31-
/**
32-
* Set to yes the store actual field in the index, no to not store it.
33-
* Defaults to `no` (note, the JSON document itself is stored, and it can be retrieved from it).
34-
*
35-
* @var string
36-
* @see http://www.elasticsearch.org/guide/reference/mapping/core-types.html
37-
*/
38-
public $store;
31+
/**
32+
* Set to yes the store actual field in the index, no to not store it.
33+
* Defaults to `no` (note, the JSON document itself is stored, and it can be retrieved from it).
34+
*
35+
* @var string
36+
* @see http://www.elasticsearch.org/guide/reference/mapping/core-types.html
37+
*/
38+
public $store;
3939

40-
/**
41-
* Set to analyzed for the field to be indexed and searchable after being broken down into token using an analyzer.
42-
* not_analyzed means that its still searchable, but does not go through any analysis process or broken down into tokens.
43-
* no means that it won’t be searchable at all (as an individual field; it may still be included in _all).
44-
* Defaults to analyzed.
45-
*
46-
* @var string
47-
* @see http://www.elasticsearch.org/guide/reference/mapping/core-types.html
48-
*/
49-
public $index;
40+
/**
41+
* Set to analyzed for the field to be indexed and searchable after being broken down into token using an analyzer.
42+
* not_analyzed means that its still searchable, but does not go through any analysis process or broken down into tokens.
43+
* no means that it won’t be searchable at all (as an individual field; it may still be included in _all).
44+
* Defaults to analyzed.
45+
*
46+
* @var string
47+
* @see http://www.elasticsearch.org/guide/reference/mapping/core-types.html
48+
*/
49+
public $index;
5050

51-
/**
52-
* Possible values are `no`, `yes`, `with_offsets`, `with_positions`, `with_positions_offsets`.
53-
* Defaults to `no`.
54-
*
55-
* @see http://www.elasticsearch.org/guide/reference/mapping/core-types.html
56-
* @var string
57-
*/
58-
public $term_vector;
51+
/**
52+
* Possible values are `no`, `yes`, `with_offsets`, `with_positions`, `with_positions_offsets`.
53+
* Defaults to `no`.
54+
*
55+
* @see http://www.elasticsearch.org/guide/reference/mapping/core-types.html
56+
* @var string
57+
*/
58+
public $term_vector;
5959

60-
/**
61-
* The boost value. Defaults to `1.0`.
62-
*
63-
* @var float
64-
* @see http://www.elasticsearch.org/guide/reference/mapping/boost-field.html
65-
*/
66-
public $boost;
60+
/**
61+
* The boost value. Defaults to `1.0`.
62+
*
63+
* @var float
64+
* @see http://www.elasticsearch.org/guide/reference/mapping/boost-field.html
65+
*/
66+
public $boost;
6767

68-
/**
69-
* The analyzer used to analyze the text contents when analyzed during indexing and when searching using a query string.
70-
* Defaults to the globally configured analyzer.
71-
*
72-
* @var string
73-
* @see http://www.elasticsearch.org/guide/reference/mapping/core-types.html
74-
*/
75-
public $analyzer;
68+
/**
69+
* The analyzer used to analyze the text contents when analyzed during indexing and when searching using a query string.
70+
* Defaults to the globally configured analyzer.
71+
*
72+
* @var string
73+
* @see http://www.elasticsearch.org/guide/reference/mapping/core-types.html
74+
*/
75+
public $analyzer;
7676

77-
/**
78-
* The type to use for this
79-
* Defaults to the property/field type.
80-
*
81-
* @var string
82-
* @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-types.html
83-
*/
84-
public $type;
77+
/**
78+
* The type to use for this
79+
* Defaults to the property/field type.
80+
*
81+
* @var string
82+
* @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-types.html
83+
*/
84+
public $type;
8585

86-
/**
87-
* The date format.
88-
* Defaults to `dateOptionalTime`.
89-
*
90-
* @var string
91-
* @see http://www.elasticsearch.org/guide/reference/mapping/date-format.html
92-
*/
93-
public $format;
86+
/**
87+
* The date format.
88+
* Defaults to `dateOptionalTime`.
89+
*
90+
* @var string
91+
* @see http://www.elasticsearch.org/guide/reference/mapping/date-format.html
92+
*/
93+
public $format;
9494

95-
/**
96-
* @var array
97-
* @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/_multi_fields.html
98-
*/
99-
public $fields;
95+
/**
96+
* @var array
97+
* @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/_multi_fields.html
98+
*/
99+
public $fields;
100100

101-
/**
102-
* Returns this class's properties as type/value array in order to directly use it for mapping information
103-
*/
104-
public function getPropertiesArray() {
105-
$properties = get_object_vars($this);
106-
unset($properties['fields']);
107-
return $properties;
108-
}
101+
/**
102+
* Returns this class's properties as type/value array in order to directly use it for mapping information
103+
*/
104+
public function getPropertiesArray()
105+
{
106+
$properties = get_object_vars($this);
107+
unset($properties['fields']);
108+
return $properties;
109+
}
109110

110-
/**
111-
* @return array
112-
*/
113-
public function getFields() {
114-
return $this->fields;
115-
}
116-
}
111+
/**
112+
* @return array
113+
*/
114+
public function getFields()
115+
{
116+
return $this->fields;
117+
}
118+
}
Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
<?php
22
namespace Flowpack\ElasticSearch\Annotations;
33

4-
/* *
5-
* This script belongs to the TYPO3 Flow package "Flowpack.ElasticSearch".*
6-
* *
7-
* It is free software; you can redistribute it and/or modify it under *
8-
* the terms of the GNU Lesser General Public License, either version 3 *
9-
* of the License, or (at your option) any later version. *
10-
* *
11-
* The TYPO3 project - inspiring people to share! *
12-
* */
4+
/*
5+
* This file is part of the Flowpack.ElasticSearch package.
6+
*
7+
* (c) Contributors of the Flowpack Team - flowpack.org
8+
*
9+
* This package is Open Source Software. For the full copyright and license
10+
* information, please view the LICENSE file which was distributed with this
11+
* source code.
12+
*/
1313

1414
use Doctrine\Common\Annotations\Annotation as DoctrineAnnotation;
1515

1616
/**
1717
* @Annotation
1818
* @DoctrineAnnotation\Target("PROPERTY")
1919
*/
20-
final class Transform {
21-
22-
/**
23-
* @var string
24-
*/
25-
public $type;
20+
final class Transform
21+
{
22+
/**
23+
* @var string
24+
*/
25+
public $type;
2626

27-
/**
28-
* @var array
29-
*/
30-
public $options;
27+
/**
28+
* @var array
29+
*/
30+
public $options;
3131
}
32-

0 commit comments

Comments
 (0)