Skip to content

Commit abec318

Browse files
committed
Fix CS
1 parent f66f925 commit abec318

8 files changed

+116
-81
lines changed

src/SchemaOrgModel/AnnotationGenerator/AbstractAnnotationGenerator.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,11 @@ public function generateUses($className)
129129
}
130130

131131
/**
132-
* Converts a Schema.org range to a PHP type
132+
* Converts a Schema.org range to a PHP type.
133+
*
134+
* @param array $field
135+
* @param bool $adderOrRemover
133136
*
134-
* @param array $field
135-
* @param bool $adderOrRemover
136137
* @return string
137138
*/
138139
protected function toPhpType(array $field, $adderOrRemover = false)

src/SchemaOrgModel/AnnotationGenerator/AnnotationGeneratorInterface.php

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,77 +36,86 @@ public function __construct(
3636
/**
3737
* Generates class' annotations.
3838
*
39-
* @param string $className
39+
* @param string $className
40+
*
4041
* @return array
4142
*/
4243
public function generateClassAnnotations($className);
4344

4445
/**
4546
* Generates interface's annotations.
4647
*
47-
* @param string $className
48+
* @param string $className
49+
*
4850
* @return array
4951
*/
5052
public function generateInterfaceAnnotations($className);
5153

5254
/**
5355
* Generates constant's annotations.
5456
*
55-
* @param string $className
56-
* @param string $constantName
57+
* @param string $className
58+
* @param string $constantName
59+
*
5760
* @return array
5861
*/
5962
public function generateConstantAnnotations($className, $constantName);
6063

6164
/**
6265
* Generates field's annotation.
6366
*
64-
* @param string $className
65-
* @param string $fieldName
67+
* @param string $className
68+
* @param string $fieldName
69+
*
6670
* @return array
6771
*/
6872
public function generateFieldAnnotations($className, $fieldName);
6973

7074
/**
7175
* Generates getter's annotation.
7276
*
73-
* @param string $className
74-
* @param string $fieldName
77+
* @param string $className
78+
* @param string $fieldName
79+
*
7580
* @return array
7681
*/
7782
public function generateGetterAnnotations($className, $fieldName);
7883

7984
/**
8085
* Generates setter's annotation.
8186
*
82-
* @param string $className
83-
* @param string $fieldName
87+
* @param string $className
88+
* @param string $fieldName
89+
*
8490
* @return array
8591
*/
8692
public function generateSetterAnnotations($className, $fieldName);
8793

8894
/**
8995
* Generates adder's annotation.
9096
*
91-
* @param string $className
92-
* @param string $fieldName
97+
* @param string $className
98+
* @param string $fieldName
99+
*
93100
* @return array
94101
*/
95102
public function generateAdderAnnotations($className, $fieldName);
96103

97104
/**
98105
* Generates remover's annotation.
99106
*
100-
* @param string $className
101-
* @param string $fieldName
107+
* @param string $className
108+
* @param string $fieldName
109+
*
102110
* @return array
103111
*/
104112
public function generateRemoverAnnotations($className, $fieldName);
105113

106114
/**
107115
* Generates uses.
108116
*
109-
* @param string $className
117+
* @param string $className
118+
*
110119
* @return array
111120
*/
112121
public function generateUses($className);

src/SchemaOrgModel/AnnotationGenerator/DoctrineOrmAnnotationGenerator.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,10 @@ public function generateUses($className)
176176
}
177177

178178
/**
179-
* Gets class or interface name to use in relations
179+
* Gets class or interface name to use in relations.
180+
*
181+
* @param string $range
180182
*
181-
* @param string $range
182183
* @return string
183184
*/
184185
private function getRelationName($range)

src/SchemaOrgModel/AnnotationGenerator/PhpDocAnnotationGenerator.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,11 @@ public function generateRemoverAnnotations($className, $fieldName)
136136
}
137137

138138
/**
139-
* Generates class or interface PHPDoc
139+
* Generates class or interface PHPDoc.
140+
*
141+
* @param string $className
142+
* @param bool $interface
140143
*
141-
* @param string $className
142-
* @param bool $interface
143144
* @return array
144145
*/
145146
private function generateDoc($className, $interface = false)
@@ -164,10 +165,11 @@ private function generateDoc($className, $interface = false)
164165
}
165166

166167
/**
167-
* Converts HTML to Markdown and explode
168+
* Converts HTML to Markdown and explode.
169+
*
170+
* @param string $doc
171+
* @param bool $indent
168172
*
169-
* @param string $doc
170-
* @param bool $indent
171173
* @return array
172174
*/
173175
private function formatDoc($doc, $indent = false)

src/SchemaOrgModel/CardinalitiesExtractor.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ class CardinalitiesExtractor
2626
const CARDINALITY_UNKNOWN = 'unknown';
2727

2828
/**
29-
* @type \EasyRdf_Graph[]
29+
* @var \EasyRdf_Graph[]
3030
*/
3131
private $graphs;
3232
/**
33-
* @type GoodRelationsBridge
33+
* @var GoodRelationsBridge
3434
*/
3535
private $goodRelationsBridge;
3636

@@ -67,8 +67,9 @@ public function extract()
6767
*
6868
* Based on [Geraint Luff work](https://github.com/geraintluff/schema-org-gen).
6969
*
70-
* @param \EasyRdf_Resource $property
71-
* @return string The cardinality
70+
* @param \EasyRdf_Resource $property
71+
*
72+
* @return string The cardinality
7273
*/
7374
private function extractForProperty(\EasyRdf_Resource $property)
7475
{

src/SchemaOrgModel/GoodRelationsBridge.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ class GoodRelationsBridge
2020
const RDF_SCHEMA_NAMESPACE = 'http://www.w3.org/2000/01/rdf-schema#';
2121

2222
/**
23-
* @type \SimpleXMLElement[]
23+
* @var \SimpleXMLElement[]
2424
*/
2525
protected $relations;
2626

2727
/**
28-
* @type array
28+
* @var array
2929
*/
3030
protected static $objectPropertiesTable = [
3131
'priceSpecification' => 'hasPriceSpecification',
@@ -45,7 +45,7 @@ class GoodRelationsBridge
4545
'acceptedPaymentMethod' => 'acceptedPaymentMethods',
4646
];
4747
/**
48-
* @type array
48+
* @var array
4949
*/
5050
protected static $datatypePropertiesTable = [
5151
'minPrice' => 'hasMinCurrencyValue',
@@ -83,7 +83,8 @@ public function __construct(array $relations)
8383
/**
8484
* Checks if a property exists in GoodRelations.
8585
*
86-
* @param string $id
86+
* @param string $id
87+
*
8788
* @return bool
8889
*/
8990
public function exist($id)
@@ -101,7 +102,8 @@ public function exist($id)
101102
/**
102103
* Extracts cardinality from the Good Relations OWL.
103104
*
104-
* @param string $id
105+
* @param string $id
106+
*
105107
* @return string|bool
106108
*/
107109
public function extractCardinality($id)
@@ -121,7 +123,8 @@ public function extractCardinality($id)
121123
/**
122124
* Converts Schema.org's id to Good Relations id.
123125
*
124-
* @param string $id
126+
* @param string $id
127+
*
125128
* @return string
126129
*/
127130
private static function convertPropertyId($id)
@@ -140,7 +143,8 @@ private static function convertPropertyId($id)
140143
/**
141144
* Gets a property URL.
142145
*
143-
* @param string $id
146+
* @param string $id
147+
*
144148
* @return string
145149
*/
146150
private static function getPropertyUrl($id)

0 commit comments

Comments
 (0)