@@ -354,11 +354,11 @@ |
||
| 354 | 354 | $result = '$'; |
| 355 | 355 | foreach ($this->stack as $index => $item) { |
| 356 | 356 | if ($item instanceof ArrayIterator && isset($this->pathIndices[$index])) { |
| 357 | - $result .= '['.$this->pathIndices[$index].']'; |
|
| 357 | + $result .= '[' . $this->pathIndices[$index] . ']'; |
|
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | if ($item instanceof JsonObjectIterator && isset($this->pathNames[$index])) { |
| 361 | - $result .= '.'.$this->pathNames[$index]; |
|
| 361 | + $result .= '.' . $this->pathNames[$index]; |
|
| 362 | 362 | } |
| 363 | 363 | } |
| 364 | 364 | |
@@ -166,7 +166,7 @@ |
||
| 166 | 166 | $token = JsonToken::BEGIN_ARRAY; |
| 167 | 167 | break; |
| 168 | 168 | case JsonNull::class: |
| 169 | - $token = JsonToken::NULL; |
|
| 169 | + $token = JsonToken::null; |
|
| 170 | 170 | break; |
| 171 | 171 | case JsonObject::class: |
| 172 | 172 | $token = JsonToken::BEGIN_OBJECT; |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | public function create(TypeToken $phpType): PropertyCollection |
| 122 | 122 | { |
| 123 | 123 | $class = $phpType->getRawType(); |
| 124 | - $key = 'properties:'.$class; |
|
| 124 | + $key = 'properties:' . $class; |
|
| 125 | 125 | |
| 126 | 126 | $data = $this->cache->fetch($key); |
| 127 | 127 | if (false !== $data) { |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function createPropertyAnnotations(string $className, string $propertyName): AnnotationSet |
| 56 | 56 | { |
| 57 | - $key = 'annotations:'.$className.':'.$propertyName; |
|
| 57 | + $key = 'annotations:' . $className . ':' . $propertyName; |
|
| 58 | 58 | if ($this->cache->contains($key)) { |
| 59 | 59 | return $this->cache->fetch($key); |
| 60 | 60 | } |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | public function createMethodAnnotations(string $className, string $methodName): AnnotationSet |
| 136 | 136 | { |
| 137 | - $key = $className.':'.$methodName; |
|
| 137 | + $key = $className . ':' . $methodName; |
|
| 138 | 138 | if ($this->cache->contains($key)) { |
| 139 | 139 | return $this->cache->fetch($key); |
| 140 | 140 | } |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | */ |
| 332 | 332 | public function setCacheDir(string $cacheDir): GsonBuilder |
| 333 | 333 | { |
| 334 | - $this->cacheDir = $cacheDir.'/gson'; |
|
| 334 | + $this->cacheDir = $cacheDir . '/gson'; |
|
| 335 | 335 | |
| 336 | 336 | return $this; |
| 337 | 337 | } |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | $propertyNamingStrategy = $this->propertyNamingStrategy ?? new SnakePropertyNamingStrategy(); |
| 353 | 353 | $methodNamingStrategy = $this->methodNamingStrategy ?? new UpperCaseMethodNamingStrategy(); |
| 354 | 354 | |
| 355 | - $doctrineAnnotationCache = false === $this->enableCache ? new ArrayCache(): new ChainCache([new ArrayCache(), new FilesystemCache($this->cacheDir)]); |
|
| 355 | + $doctrineAnnotationCache = false === $this->enableCache ? new ArrayCache() : new ChainCache([new ArrayCache(), new FilesystemCache($this->cacheDir)]); |
|
| 356 | 356 | $doctrineAnnotationCache->setNamespace('doctrine_annotation_cache'); |
| 357 | 357 | $reader = new CachedReader(new AnnotationReader(), $doctrineAnnotationCache); |
| 358 | 358 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | public function __construct(JsonObject $jsonObject) |
| 24 | 24 | { |
| 25 | - foreach($jsonObject as $key => $value) { |
|
| 25 | + foreach ($jsonObject as $key => $value) { |
|
| 26 | 26 | $this->queue[] = [$key, $value]; |
| 27 | 27 | $this->total++; |
| 28 | 28 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | throw new OutOfBoundsException('@Until annotation must specify a version as the first argument'); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - $this->value = (string) $params['value']; |
|
| 42 | + $this->value = (string)$params['value']; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -41,11 +41,11 @@ |
||
| 41 | 41 | public function __construct(array $params) |
| 42 | 42 | { |
| 43 | 43 | if (isset($params['serialize'])) { |
| 44 | - $this->serialize = (bool) $params['serialize']; |
|
| 44 | + $this->serialize = (bool)$params['serialize']; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | if (isset($params['deserialize'])) { |
| 48 | - $this->deserialize = (bool) $params['deserialize']; |
|
| 48 | + $this->deserialize = (bool)$params['deserialize']; |
|
| 49 | 49 | } |
| 50 | 50 | } |
| 51 | 51 | |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | throw new OutOfBoundsException('@Since annotation must specify a version as the first argument'); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - $this->value = (string) $params['value']; |
|
| 42 | + $this->value = (string)$params['value']; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -23,6 +23,6 @@ |
||
| 23 | 23 | const STRING = 'string'; |
| 24 | 24 | const BOOLEAN = 'boolean'; |
| 25 | 25 | const NUMBER = 'number'; |
| 26 | - const NULL = 'null'; |
|
| 26 | + const null = 'null'; |
|
| 27 | 27 | const NAME = 'name'; |
| 28 | 28 | } |