@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | public function set(array $data): self |
| 35 | 35 | { |
| 36 | 36 | foreach ($this->types as $name => $type) { |
| 37 | - if (! array_key_exists($name, $data)) { |
|
| 37 | + if (!array_key_exists($name, $data)) { |
|
| 38 | 38 | $type = serialize($type); |
| 39 | 39 | |
| 40 | 40 | throw WrongType::withMessage("Missing field for this struct: {$name}:{$type}"); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | public function offsetGet($offset) |
| 52 | 52 | { |
| 53 | - if (! array_key_exists($offset, $this->values)) { |
|
| 53 | + if (!array_key_exists($offset, $this->values)) { |
|
| 54 | 54 | throw UninitialisedError::forField($offset); |
| 55 | 55 | } |
| 56 | 56 | |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | $type = $this->types[$offset] ?? null; |
| 67 | 67 | |
| 68 | - if (! $type) { |
|
| 68 | + if (!$type) { |
|
| 69 | 69 | throw WrongType::withMessage("No type was configured for this field {$offset}"); |
| 70 | 70 | } |
| 71 | 71 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | public function offsetGet($offset) |
| 50 | 50 | { |
| 51 | - if (! array_key_exists($offset, $this->values)) { |
|
| 51 | + if (!array_key_exists($offset, $this->values)) { |
|
| 52 | 52 | throw UninitialisedError::forField("index {$offset}"); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -57,13 +57,13 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | public function offsetSet($offset, $value) |
| 59 | 59 | { |
| 60 | - if ($offset === null || ! is_numeric($offset)) { |
|
| 60 | + if ($offset === null || !is_numeric($offset)) { |
|
| 61 | 61 | throw WrongType::withMessage('You must specify a numeric offset'); |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | $type = $this->types[$offset] ?? null; |
| 65 | 65 | |
| 66 | - if (! $type) { |
|
| 66 | + if (!$type) { |
|
| 67 | 67 | throw WrongType::withMessage("No type was configured for this tuple at offset {$offset}"); |
| 68 | 68 | } |
| 69 | 69 | |
@@ -95,10 +95,10 @@ |
||
| 95 | 95 | |
| 96 | 96 | $type = gettype($value); |
| 97 | 97 | |
| 98 | - if (! method_exists(self::class, $type)) { |
|
| 98 | + if (!method_exists(self::class, $type)) { |
|
| 99 | 99 | throw InferredTypeError::cannotInferType($type); |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | - return forward_static_call(self::class . '::' . $type); |
|
| 102 | + return forward_static_call(self::class.'::'.$type); |
|
| 103 | 103 | } |
| 104 | 104 | } |