@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $targClass = $resourceType->getInstanceType()->getName(); |
129 | 129 | if (!($res instanceof $targClass)) { |
130 | 130 | $msg = 'Object being serialised not instance of expected class, ' |
131 | - . $targClass . ', is actually ' . $payloadClass; |
|
131 | + . $targClass . ', is actually ' . $payloadClass; |
|
132 | 132 | throw new InvalidOperationException($msg); |
133 | 133 | } |
134 | 134 | |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | if (!(ResourcePropertyKind::RESOURCESET_REFERENCE == $propKind |
573 | 573 | || ResourcePropertyKind::RESOURCE_REFERENCE == $propKind)) { |
574 | 574 | $msg = '$propKind != ResourcePropertyKind::RESOURCESET_REFERENCE &&' |
575 | - . ' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE'; |
|
575 | + . ' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE'; |
|
576 | 576 | throw new InvalidOperationException($msg); |
577 | 577 | } |
578 | 578 | $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed'; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $fileName = $method->getFileName(); |
36 | 36 | |
37 | 37 | $file = new SplFileObject($fileName); |
38 | - $file->seek($method->getStartLine() - 1); |
|
38 | + $file->seek($method->getStartLine()-1); |
|
39 | 39 | $code = ''; |
40 | 40 | while ($file->key() < $method->getEndLine()) { |
41 | 41 | $code .= $file->current(); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | $code = trim(preg_replace('/\s\s+/', '', $code)); |
46 | 46 | $begin = strpos($code, 'function('); |
47 | - $code = substr($code, (int)$begin, strrpos($code, '}') - $begin + 1); |
|
47 | + $code = substr($code, (int) $begin, strrpos($code, '}')-$begin+1); |
|
48 | 48 | return $code; |
49 | 49 | } |
50 | 50 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | ) { |
86 | 86 | continue; |
87 | 87 | } |
88 | - $relationships[]= $method; |
|
88 | + $relationships[] = $method; |
|
89 | 89 | } |
90 | 90 | } |
91 | 91 | return $relationships; |
@@ -257,10 +257,10 @@ |
||
257 | 257 | |
258 | 258 | private static $fieldOrderCache = [ |
259 | 259 | 'BelongsTo' => ['foreignKey', 'ownerKey'], |
260 | - 'BelongsToMany' => ['parentKey','foreignPivotKey','relatedPivotKey','relatedKey'], |
|
261 | - 'HasOneOrMany' => ['localKey', 'foreignKey' ], |
|
260 | + 'BelongsToMany' => ['parentKey', 'foreignPivotKey', 'relatedPivotKey', 'relatedKey'], |
|
261 | + 'HasOneOrMany' => ['localKey', 'foreignKey'], |
|
262 | 262 | 'HasManyThrough' => ['localKey', 'firstKey', 'secondLocalKey', 'secondKey'], |
263 | - 'MorphToMany' => ['parentKey','foreignPivotKey','morphType', 'relatedPivotKey','relatedKey'], |
|
263 | + 'MorphToMany' => ['parentKey', 'foreignPivotKey', 'morphType', 'relatedPivotKey', 'relatedKey'], |
|
264 | 264 | 'MorphTo' => ['foreignKey', 'morphType', 'ownerKey'], |
265 | 265 | 'MorphOneOrMany' => ['localKey', 'morphType', 'foreignKey'], |
266 | 266 | ]; |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | * |
15 | 15 | * @param EntityGubbins $entity |
16 | 16 | */ |
17 | - public function addEntity(EntityGubbins $entity): void ; |
|
17 | + public function addEntity(EntityGubbins $entity): void; |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * returns all Relation Stubs that are permitted at the other end. |
@@ -46,5 +46,5 @@ discard block |
||
46 | 46 | * @param string $className |
47 | 47 | * @return bool |
48 | 48 | */ |
49 | - public function hasClass(string $className): bool ; |
|
49 | + public function hasClass(string $className): bool; |
|
50 | 50 | } |
@@ -136,7 +136,7 @@ |
||
136 | 136 | |
137 | 137 | $topCountValue = $this->getRequest()->getTopOptionCount(); |
138 | 138 | if (null !== $topCountValue) { |
139 | - $remainingCount = $topCountValue - $this->getRequest()->getTopCount(); |
|
139 | + $remainingCount = $topCountValue-$this->getRequest()->getTopCount(); |
|
140 | 140 | if (0 < $remainingCount) { |
141 | 141 | if (null !== $queryParameterString) { |
142 | 142 | $queryParameterString .= '&'; |
@@ -293,9 +293,9 @@ |
||
293 | 293 | [$this->getBaseType() ?? '', $other->getBaseType() ?? ''], |
294 | 294 | [$this->getRelationName() ?? '', $other->getRelationName() ?? ''], |
295 | 295 | ]; |
296 | - foreach($cmps as $cmpvals){ |
|
296 | + foreach ($cmps as $cmpvals) { |
|
297 | 297 | $cmp = strcmp($cmpvals[0], $cmpvals[1]); |
298 | - if(0 !== $cmp){ |
|
298 | + if (0 !== $cmp) { |
|
299 | 299 | return $cmp / abs($cmp); |
300 | 300 | } |
301 | 301 | } |
@@ -293,9 +293,9 @@ |
||
293 | 293 | [$this->getBaseType() ?? '', $other->getBaseType() ?? ''], |
294 | 294 | [$this->getRelationName() ?? '', $other->getRelationName() ?? ''], |
295 | 295 | ]; |
296 | - foreach($cmps as $cmpvals){ |
|
296 | + foreach($cmps as $cmpvals) { |
|
297 | 297 | $cmp = strcmp($cmpvals[0], $cmpvals[1]); |
298 | - if(0 !== $cmp){ |
|
298 | + if(0 !== $cmp) { |
|
299 | 299 | return $cmp / abs($cmp); |
300 | 300 | } |
301 | 301 | } |